The moment you feel your head start to pound, you might want to reach for medicine or close your eyes and lie down in the dark. But if it’s a tension headache, there’s a surprising solution: exercise.If the last thing you feel like doing is going for a run or sweating it out at the gym, no worries. Save the sweaty session for another day. What you need now is a different type of fitness fix.

What you want is a workout that can lower your stress and unwind muscle tightness — two of the biggest causes of tension headaches. Certain types of exercise soothe both those problems.

What to Try

You want to do something that’s low-impact and that relaxes you, especially in two key areas.

“The two areas your workout should focus on are breathing and neck or spinerelaxation,” says Merle Diamond, MD, managing partner of Diamond Headache Clinic in Chicago. “If I had to pick one workout, I’d say that yoga would be perfect. It helps you stretch and unwind your body, improve your posture (especially if you’ve been hunched over your computer all day), and breathe more slowly — all things that can help reduce a headache in the moment.”

It really does work.

“When I feel a headache coming on, either from stress or spending too many hours in front of my laptop, I get down on my yoga mat and do a series of moves like cat-cow, seated neck rolls, and bridge,” says Amy Palanjian, who’s in her 30s and lives in Des Moines, IA. “Going through those motions helps relieve the tension that has built up in my spine and neck, and almost instantly, my head starts to feel better.”

If yoga isn’t your thing, you could do some light cardio on an elliptical trainer or walk around your neighborhood. Or do Pilates, or core exercises, such as in a barre class. “They stretch out your neck and back while also teaching you how to breathe slowly,” Diamond says.It’s not just about going through the motions. “So many people can’t relax enough to sit and do a meditation,” Diamond says, “but these types of exercises will give them similar stress-relieving benefits.”