If you’re like a lot of guys, your morning cup of Joe leaves you bright-eyed and ready to take on the day—just as soon as you’re done pooping.

But what is it about the brew that blasts your bowels?
At the surface, it’s pretty simple: Coffee increases contractions in your gut, which activate that gotta-go urge as stool travels to your rectum, said Dr. Satish Rao, Ph.D., the director of the digestive health center at Georgia Regents University.

Two decades ago, Rao and his teams recruited 12 lucky people to wear anal probes with sensors that measured pressure activity throughout different parts of their colons and rectums. Over the course of 10 hours, the subjects drank the same amounts of caffeinated coffee, decaf coffee, and hot water, and ate a 1,000-calorie burger meal.

The food triggered the greatest activity in the participants’ guts, but the researchers were surprised to discover that caffeinated java prompted contractions of a near-similar magnitude—60 percent stronger than that of hot water, and 23 percent more intense than decaf.

This shows caffeine—a known stimulant—does play a role in jumpstarting your colon, but it’s not the only player involved. There’s likely something in coffee itself that’s responsible for your need to go number 2, says Dr. Rao.

Related: 7 Ways to Boost Your Energy without Caffeine

Experts have a theory: Just minutes after you ingest java, it reaches your stomach. One or more of its hundreds of compounds triggers the production of certain hormones in your body, such as motilin—which stimulates gut contractions—or gastrin, which causes the secretion of acid in your stomach. That’s when the pooping kicks in.  

But scientists say it’s also possible that a combination of everything involved in your A.M. routine sends you scurrying to the toilet.

Your colon is about twice as active in the morning thanks to your body’s circadian rhythms, Rao said. Add in breakfast, wash it down with coffee—both of which independently spark colonic contractions—and you can see why you’re clamoring for a crap afterward.  

To avoid spending overtime in the office restroom, hold off on making your Starbucks run until about 2 hours after you wake up. This will give your colon enough time to calm down from its morning rev, Rao said.

(For more must-have medical advice and 2,476 tips to help you take total control of your health, check out The Better Man Project.)

And when you drink your first cup, try not to pair it with food or exercise, since they’ll both get your gut going, too.