We’ve all been there: Sometimes working out makes you break wind (just search #yogafarts on Twitter if need to commiserate). But just because we all experience it, doesn’t make it any less embarrassing. Here’s why it happens and what you can do about passing gas at the gym.

The Truth Behind Your Toots

The causes of workout-induced flatulence are multi-faceted, says Niket Sonpal, M.D., assistant clinical professor at Touro College of Osteopathic Medicine in New York City. The first cause is all that heavy breathing. “This excess air gets trapped in the digestive tract, only to be released through the anus,” he says.

The second issue is that your sweat sessions tend to speed up the digestive process. “Aerobic exercises help move food through the digestive process faster and makes for the release of gases caught in the digestive tract,” Sonpal says. And unfortunately, anaerobic exercise—a.k.a. strength training—isn’t really any better. “Whenever you do a workout squeezing those core muscles, it makes you squeeze your colon too, literally pushing the air out,” he adds. (Work out at home with Women's Health's 20-Minute Workouts DVD!) 

RELATED: 7 Yoga Poses to Help You Poop

How to Stop Your Stink

While you can’t totally eliminate your risk of ripping one at the gym, there are a few things you can do to make it less likely. “Stay away from gas-producing foods before a workout such as wheat, corn and potatoes, and vegetables such as broccoli, cabbage, lentils and cauliflower,” says Sonpal. On that same note, avoid carbonated water. During your workout, focus on your breathing and try to breathe in through your nose and out through your mouth. “That way you swallow less air and in turn have less wind for the trumpet to play,” Sonpal says.

Try these bodyweight exercises if you decide to get fit (and let out those farts) in the privacy of your own home: 

preview for 19 Bodyweight Exercises

RELATED: 7 Reasons You're Farting All the Damn Time

Make Friends with Your Farts

At the end of the day, remember that farting is simply a fact of life—no gym or yoga class is immune. “Trying to hold it in and can lead to distension, bloating, and cramps,” says Sonpal. “In the words of Shrek...better out than in”

Headshot of Macaela Mackenzie
Macaela Mackenzie

Macaela MacKenzie is a journalist who writes about women and power. She covers women’s equality through the lenses of sports, wellness, and the gender gap across industries and is the author of MONEY, POWER, RESPECT: How Women in Sports Are Shaping the Future of Feminism. Mac was most recently a Senior Editor at Glamour where she directed all health and wellness coverage. Her work has appeared in Elle, Glamour, SELF, Bustle, Marie Claire, Allure, Women's Health, and Forbes among other publications.