A bad night’s sleep doesn’t just make you cranky — it makes you gain weight, too.

In a recent video for the YouTube channel BrainCraft, host Vanessa Hill explained shortened or disturbed sleep prevents your body from properly stopping production of the stress hormone cortisol. And when you have higher levels of stress, you have fewer and less diverse microbes in your gut, leaving room for bad bacteria "to lurk around." The sleep-wake cycle also intertwines with the gut microbiome, and poor sleep could have adverse effects on metabolism.

"Disrupting your body's internal clock can lead to cravings for unhealthy food, and then eating unhealthy food messes with your appetite," Hill said.

In one mice study, mice fed a high-fat diet saw a change in their gut activity and ate more frequently; "think having multiple lunches and a midnight snack." But mice fed a high-fiber, low-fat diet stayed lean. Other studies have shown gut bacteria are responsible for the number of calories you burn while you sleep, which is only further incentive to "keep those guys happy," Hill said.

Yes, it's a "dynamic relationship," but Hill believes it's important to understand that a, this relationship exists and b, you have more influence over it than you might think.

Watch the video to learn more about how to keep your gut (and waistline) healthy.