This article originally appeared in “Women’s Running”

If you’ve ever had to slow down or drop out of a race due to stomach pains, or have been forced to create your own “bathroom” en route, you know how frustrating (and sometimes embarrassing) on-the-run tummy troubles can be.

A number of factors influence the occurrence of gastrointestinal issues, including gut health, what and when you eat, dehydration and stress, says Marni Sumbal, a sports dietitian and 11-time IRONMAN finisher based in Greenville, S.C. Fortunately, there are actions you can take to limit GI distress and prime your body for better performance at the same time.

24–48 hours prior to running

Although we don’t often relate yesterday’s lunch to today’s gut issues, it could take up to 48 hours for that quesadilla to fully exit your system. This means that if you have a sensitive stomach, you’re best off consuming a low-fiber diet for a day or two prior to racing, Sumbal says.

Fibrous foods leave a high amount of residue in the gut (contributing to larger stools) and take more time and energy to digest. When you run, blood flow is prioritized to your muscles (instead of your gut), making your digestive tract function less efficiently.

The night before a run, Sumbal recommends foods such as soup, white rice, low-fiber vegetables and lean protein, and she says to allow at least three hours to digest before going to sleep.

Pre-run snacks and meals

Determining what and when to eat prior to a run can involve some trial and error. “Athletes need to practice and understand which foods work the best before different types of workouts (such as long runs versus speed training) and how long to allow for digestion,” Sumbal says.

Again, she recommends choosing low-residue, or low-fiber, foods. “Instead of having an apple with peanut butter, have applesauce with a spoonful of nut butter,” Sumbal says.

For most people, 30–60 minutes should be enough to digest a 150–200 calorie pre-run snack. If you have a sensitive stomach, however, you may need up to 90 minutes. If you plan to eat a full meal, she suggests leaving at least three hours for digestion, particularly on race days.

Dehydration limits blood flow to the digestive tract (along with causing other issues), so aim to drink 12–16 ounces of water in the 60 minutes before running.

On the run

Sumbal says that athletes who are prone to GI issues should allow up to eight weeks to train their gut to consume calories and fluids while running. The first step is to practice drinking water. Next, she recommends a sports drink—take two sips every 10 minutes.

Sumbal says, “Athletes should make it a habit to always consume calories during runs over 60 minutes,” if your stomach can take it. Aim for 50–80 calories of a sports drink every 30–45 minutes, consuming sips every 10–15 minutes. If you prefer a gel, squeeze it into a flask to dilute it and taking a swig every 10–15 minutes along with plain water.

Gut-friendly fare for runners

Looking for some simple, go-to foods that will keep your tummy happy while you run? Here are Sumbal’s favorites…

Allow at least 30 minutes to digest

  • Rice cake + nut butter + banana + honey
  • English muffin + butter + jam
  • Cream of Wheat + berries + chopped almonds

Race-day meal
Allow 90+ minutes to digest

  • Two waffles + nut butter + banana + honey
  • Pancakes (there’s a pre-workout recipe at + nut butter + banana slices or berries
  • Granola + almond milk + glass of juice