The Scientist: Nancy Clark, M.S., R.D., a Boston-area sports nutritionist and author of “Nancy Clark’s Sports Nutrition Guidebook”

The Answer: Emergency pit stops are a common problem for runners on their way to the finish line—and, indeed, sometimes there’s no time to get to the port-a-potty. One survey of marathoners in the U.K. found that the vast majority (83 percent) frequently suffered at least one gastrointestinal disturbance during or right after a long run. The issues were more likely to affect women than men, with 74 percent of women reporting the urge to have a bowel movement and 68 percent getting diarrhea. Hence the term “runners’ trots.”

Symptoms are nearly twice as likely to happen while running than other high-endurance sports like cycling and swimming, which suggests that the jostling of the intestines plays a role. At the same time, while running long distances, blood flow is diverted from the intestines to the muscles at work. These factors could alter gut permeability, which can contribute to GI symptoms, though that link has not been fully substantiated. Then there’s dehydration; GI complaints are common in runners who have sweated off more than 4 percent of their body weight (that’s 5.6 pounds for a 140-pound athlete).

To keep the chance of tummy trouble to a minimum, reduce your intake of high-fiber foods, stay away from sugar-free candies that contain sorbitol—which is known to have a diuretic effect—and drink extra water to maintain hydration without overhydrating. You can also try exercising lightly before a race to help empty the bowels ahead of time.

MORE: The 12 Best Exercises for Runners