Stand up straight and suck in your stomach. That refrain probably echoed throughout your youth and adolescence. Now you’re an adult who spends a large part of the day bent over a computer or tablet, stressing over work and life and going without enough sleep. All this takes a toll in the form of back aches and pain. Maybe it’s time to put that childhood admonition to work for you.

Good posture and exercise go a long way toward preventing back pain. If you are already enduring back problems, stretching and strengthening core muscles can relieve the aches and protect your spine. One recent study showed that people who combined two to three exercise classes a week with a home workout reduced their risk of pain by 45 percent the following year.

Exercising can fight other problems that make big contributions to back pain: fatigue, sleep problems and depression. Start moving and make exercise a regular part of your day. Just remember to check with your doctor before starting an exercise routine.

Squeeze Those Abs

Whether you are lying down, sitting or standing, you can work on the stomach muscles that protect your back. Place your arms at your sides. Inhale, and then slowly pull in your stomach muscles as you exhale. Keep breathing as you hold the contraction for five to 10 seconds. Repeat 10 times.

Banish the Laptop Hunch

Counteract the pain from poor posture. Three times each day, take a break from your laptop by bending your head slowly back, forward and to each side. Here’s another: Lie on your stomach and place your hands on the ground by your chest. Lift your chest as far as is comfortable by pressing into your palms. Take a few deep breaths in that position, and then return to your starting prone position.

Start Stretching

A stronger core better supports your back and protects against pain. Stretch your back twice daily if you already are suffering from back aches. Strengthen your core muscles by stretching once a day to avoid developing back pain.

Try this spine stretch: Lie on your back and bend your knees. Place your feet flat on the floor and arms at your sides. Contract your stomach muscles, and pull your right knee to your chest with both hands while straightening out your left leg on the floor. Straighten your right arm out on the floor. With your left hand, pull your right knee over toward your left side. Turn your head toward your extended right arm. Hold the stretch for 20 seconds without arching your back. Keep your head, arms and shoulders on the floor. Return both knees to your starting position. Repeat the stretch on the other side.

A final word: Pay attention to your posture during the day. Pull your shoulder blades down and slightly toward each other. This move will open your chest. Also, check to make sure your ears are positioned above your shoulders.