More than 100 million people in the U.S. are expected to travel at some point between this Christmas and New Year’s Day—and each and every one of them will take roughly 100 trillion intestinal microbes along for the ride.

Among the various other things influenced by these gut bacteria—like eating habits, for example—they also help control how much, or how little, a person poops. For many travelers, “how little” is the operative phrase: By one estimate, as many as 40 percent of people experience constipation while they’re away from home, due partially to their gut bacteria’s reaction to the change of setting.

“Any time you leave your general habitat, it’s throwing your gut microflora off balance,” says Brooke Alpert, a New York-based registered dietician. Sometimes, that begins before you reach your new destination: In some people, the very act of traveling from point A to point B can cause constipation. Movement stimulates the gut, so sitting on a plane or in a car for long periods of time can cause the intestines to clog; ignoring the urge to go while in the air or on the road can also make it more difficult once you finally sit down on the toilet.

Time differences can also pose a problem. Many people have a normal bowel-movement routine, pooping at regular intervals throughout the day. But when jetlag or a new time zone shifts that schedule ahead or backwards by a few hours, it can mess up that routine, causing constipation.

Even the stress of traveling can make it difficult for people to poop while they’re away. Researchers have nicknamed the gut “the second brain” for the millions of neurons that line the intestines. These cells play a role in digestion, but less understood is the interplay between a person’s gut and her mental state. Researchers do know, however, that things like anxiety can affect the way this “second brain” functions. (Think of butterflies in the stomach, or a stomach tied up in knots.)

“It’s influenced by stress,” says Elizabeth Bik, a microbiologist who studies the microbiome at Stanford University, “[and] that can have an effect on the way our bowels work.” The experience of a holiday trip—remembering to pack everything, navigating a crowded airport, staying with family for an extended period of time—may be enough to stop the bowels from functioning the way they usually do.

Because everyone’s microbiome is different, there’s no one-size-fits-all trick for preventing traveler’s constipation, Alpert says, but there are a few methods that typically prove helpful. Fermented foods like yogurt and sauerkraut, for example, can help relieve intestinal problems, and drinking plenty of water makes it easier for stool to pass through the intestines.

High-fiber foods like fruits and vegetables can have the same effect as water. They’re not always easy to find amid the snack selections at airports and rest stops, though, and vacation isn’t generally a time when people commit themselves to healthy eating.

“We do eat differently [on vacation] than at home,” Bik says. A higher intake of bready and greasy foods, in fact, may be another reason why people experience traveler’s constipation. But swapping the pastry for a salad may help get the bowels moving again—as fiber passes through our system, it stimulates the mucus layer on our intestinal walls, which can help relieve the symptoms of constipation, Bik says.

So can staying home, but that’s not very festive.