4 Surprising Ways Your Gut Health May Affect Your Sleep

Photo: Stocksy/Lumina
Ever had a late-afternoon coffee and then inexplicably had trouble falling asleep at night? That may be due in part to the way gut health affects sleep. The gut-sleep connection refers to the way what's happening in your gut microbiome (aka the makeup of the bacteria in your gut) directly affects your sleep cycle. The relationship between the gut microbiome and sleep quality, though, extends beyond your coffee habits or what you ate for dinner.

Sleep psychologist Michael Breus, PhD, (popularly known as The Sleep Doctor) and gastroenterologist Doug Drossman, MD (the author of Gut Feelings, $40), have both extensively studied the gut-brain connection, including how sleep fits into the puzzle. While there's still a lot to learn about the way that connection extends in such a way to understand how gut health affects sleep, what we do know is that they are definitely intertwined.


Experts In This Article

Below, Dr. Breus, Dr. Drossman, and other experts break down how gut health and sleep connect and give their best advice on how to improve your sleep via a healthier gut.

4 ways gut health affects sleep

1. Thriving healthy gut bacteria is linked to better sleep

Some research connects good gut bacteria (probiotics) and good sleep. Dr. Breus references a small 2016 study that finds one bacteria strain, in particular, making a difference: "Scientists in Japan studied the impact of a daily serving of a probiotic on a group of students who were preparing to take an exam," he says. "Scientists divided the students into two groups. For eight weeks leading up to the exam, and three weeks after, one group drank a placebo beverage every day, while the other group drank a probiotic beverage containing the bacteria lactobacillus casei strain shirota—sometimes referred to as l. casei strain Shirota." (It's a strain found naturally in the human microbiome, as well as in fermented gut-friendly foods like yogurt, he says.)

By the end of the study, the students in the probiotic drink group were enjoying more, higher-quality sleep than those in the placebo group—suggesting, the study authors wrote, that daily consumption of this particular probiotic might support sleep during times of stress.

It's important to note that the participants in this small study (fewer than 200 participants) were all students in Japan. A more robust study with a bigger sample size and participants who  have diverse cultural backgrounds and eating habits would make the results more conclusive. That's because "the microbiome is incredibly complex and varies from one individual to the next," says Dr. Breus. "The bacteria that’s beneficial for one person, or a small group of people, may not have the same effects on another person." Even so, the connection between probiotics and good sleep is still an interesting takeaway, making probiotic-rich foods—like this gut health smoothie—great additions to any nutrition plan.

2. Bad gut bacteria is linked to poor sleep

Much in the way that good gut bacteria is linked to good sleep, bad gut bacteria is associated with poor sleep. But, correlation doesn't mean causation. "[Researchers] are still studying this, and it isn't quite clear if the bad bacteria is affecting the brain or if the brain is affecting gut composition," Dr. Drossman. In other words, it's a bit of a "chicken or the egg" situation.

For example, one small 2019 study of 40 male participants published in the journal Public Library of Science connected a healthy microbiome and sleep quality. It also connected the presence of certain bacterial strains to poor sleep (although the evidence isn't super conclusive that sleep deprivation can change the gut microbiome). Given the narrow sample selection of this study, more research is needed to produce conclusive results.

3. Microbes produce sleep-regulating hormones

Melatonin is a hormone made by the pineal gland in the brain that regulates the sleep-wake cycle. But Dr. Breus says many people don't know that microbes in the gut produce melatonin and other sleep-regulating hormones, such as serotonin, dopamine, and gamma aminobutyric acid (GABA). "There are two types of melatonin, [one] from the pineal gland and intestinal melatonin," he explains. And turns out, there's actually 400 times more melatonin in your gut than in your pineal gland, per a September 2011 review in the World Journal of Gastroenterology.

Because microbes in the gut produce sleep-regulating hormones, gut health and circadian rhythm directly affect each other, according to sleep doctor Michael Breus, PhD

Dr. Breus says that because microbes in the gut produce sleep-regulating hormones, gut health and circadian rhythm directly affect each other. Research surrounding how what we eat affects serotonin, dopamine, and GABA levels is an emerging field of study for using food to boost mood and lower depression. Because these same hormones are linked to the sleep cycle, this means eating with them in mind could potentially help you sleep better, too.

4. Poor sleep could be a symptom of irritable bowel syndrome

Dr. Drossman says that he has seen through patients and research that irritable bowel syndrome (IBS), a gut-health-related condition, can impact sleep. "We know that people with certain health conditions like gastroesophageal reflux disease (GERD) or IBS tend to have more disrupted sleep," he says. "[These conditions are] gut-brain interaction disorders, so factors affecting the gut will affect the brain—and vice versa." He explains that getting to the root causes of GERD, IBS, or other gut health disorders stand to address both digestive distress and possibly improve sleep, as well.

How to improve sleep through gut health

Knowing that what's happening in your gut may affect how well you sleep at night is one thing. But knowing how to use this helpful intel to get better rest is another. To start, since there's a studied connection between good bacteria and good sleep (and bad gut bacteria and poor sleep), Dr. Breus recommends eating gut-friendly foods for improved sleep.

"Your diet has a significant influence over the health of your microbiome," he says. "Diets heavy on sugars, fatty- and highly-processed foods can alter the makeup of your gut microbiome, reducing the abundance of beneficial microorganisms. Limiting these foods, and replacing them with whole, unprocessed nutrient-rich foods like vegetables, fruits, and whole grains, can help restore and protect the beneficial bacteria in your gut."

Dr. Breus also recommends eating a wide variety of plants, which can help feed and support the growth of a wider range of beneficial gut bacteria. "A diet rich in whole fruits and vegetables is the foundation of healthy living, and healthy sleep," he says. "To give your body a true diversity of beneficial bacteria, pay attention to getting as broad a variety of plant-based foods as you can."

It's the same advice gastroenterologist Will Bulsiewicz, MD, previously told Well+Good: "It’s scientifically proven that the single greatest predictor of a healthy gut is a diversity of plants [in one’s diet]."

Watch the video below for more tips on how to eat with gut health in mind:

Treating existing gut health issues you may have can also help improve sleep. Dr. Drossman emphasizes that this may take the help of a gastroenterologist since gut conditions are so complex and individualized, but something that can help across the board is doing what you can to manage the stress in your life. "Stress can alter the bacteria in the gut," he says. And when bad things are happening in the gut, your sleep cycle may pay the price. Even simple actions such as five minutes of deep breathing or meditation have shown to reduce stress and positively impact the gut, and by proxy, your sleep.

While researchers are continuing to learn more about how exactly gut health and sleep are connected, what's crystal clear is that there is a strong relationship. And like with any relationship, what's good for one party is good for the other. Know that whenever you do something with gut health in mind—like making a mindful effort to eat a veggie-filled meal—you're already prepping yourself for a good night's sleep.

Frequently asked questions about gut health and sleep to know

What are some signs of poor gut health?

Most people know they are having stomach issues if they are experiencing constipation or diarrhea, but poor gut health is not limited to those typical signs. "If you have constant unexplained feelings of fatigue, lethargy, inattention, bloating, achiness, irregular bowel movements, and difficulty losing weight," those could be signs of a bad gut, says Amy Lee, MD, Head of Nutrition for Nucific and an expert in weight control, obesity, and nutrition.

It may be strange to think that acne, depression, or anxiety can stem from gut health issues, but it can. Be sure to consult with a gastroenterologist if you feel like something is off.

How do you improve your gut health?

Your diet has a huge impact on gut health, and addressing your food choices can help "reset" your body. Dr. Lee says replacing refined carbs and sugar with fruits and vegetables and eating lean proteins like chicken and turkey is a good start.

"Add more fiber-rich foods to your diet that contain prebiotics, which provide a nurturing environment for all those probiotics," says Katherine Basbaum, MS, RD, with MyFitnessPal. "Foods to focus on include whole grain breads and cereals as well as fresh or frozen fruits and vegetables, beans and legumes."

You don't necessarily need to make drastic changes to start improving your gut health and sleep quality. Simple shifts like drinking water and moving your body can help: "Lifestyle changes are my first defense and aren’t talked about enough," says Supriya Rao, MD, gastroenterologist and spokesperson for Benefiber. "I ask my patients if they drink alcohol, if they get good sleep, if they eat a lot of fast food or processed red meat, if they smoke, how often they exercise, and what their stress levels are. To reset your gut health, consider your diet, limit processed foods, focus on whole foods, avoid risky substances, lower stress levels, and exercise daily."

How does sleep affect gut health?

Sleep affects your brain, body, and gut. It's vital to our existence. "Restorative sleep is important to allow your body to repair itself," says Dr. Rao. "Sleep deprivation has been shown to increase all-cause mortality⁠. Our gut is the center of our health and is interconnected [with sleep]."

There are a number of options for how to address this, including nutrition and stress-relieving shifts mentioned above. There are free sleep apps that can help you track your progress and get a better night's rest, for example. MyFitnessPal actually has a new sleep feature on its app, which allows you to see your nightly insights. With that data, you can see trends in the food or drinks you consumed when you had better or worse sleep, helping guide you towards healthy habits. For example, caffeine and alcohol are known to disrupt sleep. "While alcohol may make you fall asleep faster initially, it’s actually harder for your body to stay asleep and get that good quality sleep we are in search of throughout the night after drinking," Dr. Rao explains.

The Headspace app allows you to track your sleep, and includes mindfulness and meditation exercises to calm you down before bed. The Oura Ring is another great resource that will give you data so you can learn how to sleep better. (Bonus: you can most likely pay for it with your FSA/HSA dollars.)

Furthermore, there are quite a few foods that make you sleepy—not just that Thanksgiving turkey. "Other foods that boost serotonin (and help the body make its natural melatonin) are nuts and seeds," says Dr. Lee. "Chicken, turkey, fish, and eggs contain tryptophan which helps with relaxation. Foods like whole grains, legumes, and leafy green vegetables have high levels of magnesium—all will help you sleep better," adds Dr. Lee.

Why does bad gut health ruin my sleep?

Gut health and sleep go hand-in-hand, and when one component is lacking, both can suffer. "There are several connections between the gut, gut microbiome, and sleep, which are mediated through several connections," says sleep specialist and neurologist Chris Winter, MD. "The gut can directly communicate with the nervous system and influence sleep via the vagus nerve. The gut microbiome can produce neurotransmitters, including serotonin and dopamine, that influence the brain and sleep. The gut is in itself a neuroendocrine organ and, as such, influences the hypothalamic-pituitary axis, which influences sleep and the circadian rhythm."

"The gut can directly communicate with the nervous system and influence sleep via the vagus nerve." —Chris Winter, MD, sleep specialist and neurologist

When one or the other is out of balance, it can compromise your health. "When an individual experiences sleep deprivation, changes in the endocrine system [like increased cortisol] creates gut microbiome imbalances. The metabolites of the disturbed gut flora can lead to further sleep loss, fatigue, and subsequent medical problems," says Dr. Winter.

Is coffee bad for gut health?

Coffee and gut health can be related, but how much your morning cup of joe affects you depends on personal factors. "Coffee contains various levels of phytochemicals or polyphenols, which are natural compounds that could make an impact on gut flora," says Dr. Lee. All to say: People will react differently to coffee. It isn't necessarily a bad gut health drink, but too much of it may not be beneficial, either.

"Some people with digestive issues like IBS may experience adverse reactions to coffee, such as increased occurrence of diarrhea," says Basbaum.

What are some lifestyle changes to support gut health for better sleep?

There are many changes you can implement right now. "Fruits and vegetables are packed with micronutrients that help to balance your gut," says Dr. Rao. "Next, manage your stress, fuel your body with fiber rich foods…practice mindfulness, stay active⁠, limit processed foods, spend time in nature, and develop meaningful connections. All of this makes for a healthy lifestyle, which makes for a healthy gut microbiome."

As always, speak with your primary-care doctor or a gastroenterologist if you are seeing side effects from certain foods or drinks, or if stomach pain or frequent bathroom trips are ruining a good night's sleep.

—medically reviewed by Angela Holliday-Bell, MD


Well+Good articles reference scientific, reliable, recent, robust studies to back up the information we share. You can trust us along your wellness journey.
  1. Smith, Robert P et al. “Gut microbiome diversity is associated with sleep physiology in humans.” PloS one vol. 14,10 e0222394. 7 Oct. 2019, doi:10.1371/journal.pone.0222394
  2. Chen, Chun-Qiu et al. “Distribution, function and physiological role of melatonin in the lower gut.” World journal of gastroenterology vol. 17,34 (2011): 3888-98. doi:10.3748/wjg.v17.i34.3888
  3. Voigt, R M et al. “Circadian Rhythm and the Gut Microbiome.” International review of neurobiology vol. 131 (2016): 193-205. doi:10.1016/bs.irn.2016.07.002
  4. Khanijow, Vikesh et al. “Sleep Dysfunction and Gastrointestinal Diseases.” Gastroenterology & hepatology vol. 11,12 (2015): 817-25.

Our editors independently select these products. Making a purchase through our links may earn Well+Good a commission.

Loading More Posts...