Transparency Disclosure — We may receive a referral fee for products purchased through the links on our site…Read More.

How Digestion Affects Your Sleep Quality

Disclaimer – Nothing on this website is intended to be a substitute for professional medical advice, diagnosis, or treatment… Read More Here.

Quality sleep is pivotal for health. Sleep is when your body repairs itself, and your brain consolidates information to learn. When you don’t get enough rest, you’re more likely to experience a variety of health challenges, including heart disease, diabetes, and obesity.

But what happens to your digestion when you don’t sleep? And what happens to your sleep when your digestion isn’t functioning at its best? In this article, we’ll explore the bidirectional relationship between digestion and sleep and give you some helpful tips on how to optimize your gut health for better rest.

Does Food Digest When You Sleep?

Your digestive system1 continues to work even when you’re asleep, though at a much slower rate. 

During sleep, the body’s tissues are also repairing and rebuilding2 themselves, memories are being consolidated, and the body may be fighting off infections as well. All of these processes that happen while we’re sleeping require energy, which primarily comes from glucose3

Glucose is carried throughout the entire body via blood to fuel the body’s functions. This glucose comes from the carbs we eat and drink during the day.3 

However, if you’ve eaten a large meal immediately before going to bed, you’re not giving the digestive system adequate time to process your food. As a result, the body may store this food4 as fat, instead of useful fuel that you’d burn and use throughout the day. Additionally, large meals just before bed can lead to heartburn, indigestion, acid reflux, or other unpleasant, sleep-disrupting symptoms5.

How Sleep Deprivation Affects Digestion

Vulnerable to Inflammation

Various digestive disorders are due to inflammation in the gut. These disorders include irritable bowel syndrome6 (IBS), Crohn’s disease, and ulcerative colitis. Often, an immune response triggers bouts of inflammation because you ate or drank something that your body did not like or recognize.6

The immune system is also closely linked to sleep. When a person is sleep-deprived, the immune system creates an excess of pro-inflammatory cytokines7, resulting in even more inflammation. This inflammation can exacerbate gut issues like IBS, Crohn’s disease, and ulcerative colitis. 

Additionally, this can make for a “chicken and egg” type of scenario because people who experience discomfort from digestive issues can have trouble sleeping, and those who have trouble sleeping are more likely to have digestive issues8.

Crave More Sugary Foods

Have you ever noticed that you feel hungrier when you’re deprived of sleep? It’s not all in your head. This biological response9 has been proven.

The reason that you’re hungrier when sleep-deprived is that insufficient sleep results in a hormonal imbalance.9 The hormone ghrelin, which makes you hungry, becomes more prevalent than the hormone leptin, which signals fullness.9 When you also consider that lack of sleep affects judgment and decision-making10, it makes sense that you’d be craving more sugary foods for an immediate boost of energy.

Predisposed to Stress

When people don’t get enough sleep, they are likely to experience more stress11. Unfortunately, the more stressed you are, the more you throw off your digestive system.

When you are stressed or anxious, your body is in “fight-or-flight12” mode, meaning that your body is using its sympathetic nervous system, which Harvard Health describes as the body’s “gas pedal.” Most of the blood and your energy resources are being diverted to your limbs and certain parts of your brain when using the sympathetic nervous system. Digestion literally stops, resulting in constipation or diarrhea.

Read More: How To Cope With Stress and Sleep

Affects Neurochemicals

The body maintains a delicate balance of hormones and chemicals that cycle through the body each day. Two of the primary hormones that affect sleep are melatonin and cortisol13. While melatonin helps facilitate sleep, cortisol helps facilitate wakefulness.

In the evening, melatonin levels rise and cortisol levels drop, preparing the body for sleep.13 Melatonin levels tend to peak between 2:00 and 4:00 a.m.14 Then the body begins to replace melatonin with cortisol, which peaks when you wake up to help you get out of bed and start your day.13 

Related to this cycle is the production of serotonin15, a neurotransmitter that is the precursor for melatonin. Serotonin is mostly found in the gut, so when there are digestive challenges and obstacles, it harms serotonin, preventing it from being converted to melatonin.15 When that happens, it may result in a drop in melatonin production, an increase in cortisol levels, and a cycle of sleepless nights.

Stomach Problems that Cause Sleep Difficulties


Indigestion16 encompasses a wide range of symptoms including belly pain, gas, bloating, nausea, a feeling of burning in the upper abdomen, and other uncomfortable feelings. As you can imagine, or maybe you’ve experienced, having indigestion makes sleeping difficult, if not impossible. It can be tough to find a comfortable sleeping position, and you may need to get up multiple times during the night to use the bathroom.


If you’re having trouble sleeping and feeling constipated, the two could be related17. Assuming that you’re getting plenty of fiber in your diet, what you’re experiencing could be either neurological or stress-related. In a recent study, researchers found that shift workers in particular – a highly stressed and sleep-deprived population – tend to be more constipated than others.17

Another common cause of constipation18 is dehydration. Not drinking enough water can slow down your digestive system, making it difficult to fall and stay asleep.

Gastroesophageal Reflux Disease (GERD)

GERD19 is a disease that includes symptoms like heartburn and acid reflux. Even though these terms are often used interchangeably, gastroesophageal reflux disease is the name of the diagnosis, heartburn is one of the symptoms of this disease, and it is caused by acid reflux.19 

Heartburn20 can be extremely uncomfortable when you’re trying to sleep. It is caused by acid backing up into the esophagus (acid reflux).20

Usually, when we swallow food, a small band at the bottom of the esophagus relaxes to allow the food to pass down into the stomach.20 Then the muscle should tighten back up again. In those with heartburn, though, this muscle isn’t working properly and stomach acid can flow back up into the esophagus.20 The stomach acid going into the esophagus causes a feeling of burning in the chest, and it is typically worse when lying down. This burning is why sleep can be difficult for many people with heartburn. 

It is thought that up to 20 percent of the U.S. population has GERD.19

Irritable Bowel Syndrome (IBS)

IBS often comes with complaints of sleep disturbances. In fact, the International Foundation for Gastrointestinal Disorders shares that 40 percent of IBS patients report difficulty sleeping.8 Other research21 has shown that when someone with IBS has a night of restless sleep, they’re more likely to experience symptoms the following day, including stomach pain, tiredness, and anxiety.

Ulcerative Colitis

Ulcerative colitis22 (UC) is a type of inflammatory bowel disease in the colon and rectum area. This condition can be incredibly uncomfortable.

In addition to having to follow a restrictive diet, people with ulcerative colitis are often doubled over in pain due to cramps.22 Unpredictable bouts of diarrhea are also commonplace, making it difficult to plan social outings. Though studies are ongoing23, an out-of-sync circadian rhythm can trigger bouts of ulcerative colitis.

Crohn’s Disease

Crohn’s disease24 is similar to ulcerative colitis in that it is also a type of inflammatory bowel disease. While ulcerative colitis involves inflammation of the entire colon, Crohn’s disease involves a mix of inflamed and healthy parts of the intestine.24 

People with Crohn’s disease typically experience sleep issues, even those who are in remission. Furthermore, poor sleep can exacerbate the issue, creating a cyclical effect. This is because, as mentioned, Crohn’s disease is an inflammatory bowel disease, and experts say that sleep deprivation is linked to inflammation25.

How to Improve Digestion While Sleeping

Quality sleep and digestion are closely connected. Poor sleep quality can cause different digestion problems, while poor digestion can make it difficult to get quality sleep. Although some factors like Crohn’s disease and ulcerative colitis require more care and medical attention, there are some ways you can improve your digestion while sleeping.

Avoid Big Meals Before Bedtime

Remember that your digestive system needs time to process food before you go to bed, so don’t overload it with a heavy meal right before bed. If you’re hungry at night, eat a small snack that combines protein, fat, and complex carbs, like a piece of toast with nut butter or lean cheese on whole grain crackers. Experts26 say this type of snack should help keep blood sugar levels stable through the night. 

Better yet, consume most of your calories earlier in the day so that your body can take a break from digesting food at night.

Learn more: Risks of Eating Before Bed

Check Your Sleep Position

According to experts, sleeping on your left side can aid digestion27. If you’re not yet a side sleeper, we recommend getting a quality mattress for side sleeping that can help you rest in this position more comfortably.

Read More: Best Mattress for Stomach Sleepers


Try to wind down at night and enjoy your evenings. Relax with a warm bath, a cup of hot herbal tea for sleep, or a chat with a friend or loved one. Instead of getting immersed in television, social media, or work emails – all of which emit blue light28 and decrease melatonin production – consider curling up with a good book to help your body and mind relax before bed.

By going to bed in a calm and relaxed mood, you’re more likely to be able to fall asleep faster and get a quality night of rest.

Herbal Supplements

Herbs29 like triphala, licorice root, slippery elm, ginger, and turmeric can soothe digestive issues, helping you get the sleep you need. Look for brands with all-natural ingredients that give your body the nutrients it needs to heal itself. Chemical-laden solutions may cover up symptoms and can make the situation worse in the long run.

Follow a Bedtime Routine

A natural and effective way to fall asleep is to follow a bedtime routine each night. By doing the same set of activities in the same order each night, you train your brain to feel sleepy. A nightly routine could be as simple as washing your face, brushing your teeth, and performing other grooming activities, or you might want to do something relaxing like taking a bath or meditating.

Prepare for Nighttime Disruptions

If you have chronic digestive issues, it’s important to understand that they probably won’t go away overnight. In most cases, you’re likely to experience some nighttime disturbances.

If this is the case, get up, go to the bathroom, and try not to worry about missing out on sleep. Research30 shows worrying about not being able to sleep is a major cause of not sleeping. Instead, try to remind yourself that most people, digestive issues or not, wake up at some point31 during the night. 

Waking up at night is normal, and sleep will come. If you find yourself lying in bed worrying about sleeping, get up and go to another room to do something relaxing until you get sleepy again. Then go back to bed.

Pay Attention to Your Diet

People with conditions like GERD, Crohn’s disease, and IBS usually have sensitivities to specific foods32, most commonly gluten, foods with too much insoluble fiber, refined or processed foods, cruciferous vegetables, allium vegetables, beans and lentils, high-fat foods, dairy, carbonated drinks, caffeine, and alcohol, and artificial sweeteners. Monitor your diet carefully, and then try to avoid anything that causes a reaction.

What Foods Are Easy to Digest and Help You Sleep?

It’s best to avoid eating right before bed, but an occasional snack should be fine if you’re feeling too hungry to wait until the morning. After all, going to bed hungry can also have a negative impact on sleep. 

Experts33 recommend eating foods that calm the body and increase serotonin levels before bed. Serotonin is a precursor to melatonin, the hormone that makes you feel sleepy.15 

Complex carbs are the best food group at producing serotonin and some good complex carbs include whole grains, brown rice, and oatmeal. However, you should avoid simple carbs before bed, like bread, pasta, cookies, or other sugars, as these may keep you awake. 

Tryptophan is also a precursor to serotonin34. This amino acid can be found in lean proteins like chicken, turkey, fish, egg whites, soybeans, and pumpkin seeds.

There are also some foods beneficial for sleep because they are higher in melatonin and magnesium, such as cherries, kiwis, and almonds.

Reduce Stress

Not only will stress negatively impact your sleep, but it will also negatively impact your digestion. Therefore, working on reducing stress throughout the day and just before bed. 

Try taking five to 15-minute breaks throughout the day to stop what you’re doing and do something relaxing. For you, relaxing might mean taking a short walk, meditating, practicing deep breathing, or talking to somebody you love. At night, implement a relaxing routine that doesn’t involve screens and instead, includes activities such as meditating, reading a book, taking a bath, or doing some gentle, relaxing stretches.

Frequently Asked Questions

Can insomnia and sleep apnea cause digestive problems?

Yes, both insomnia and sleep apnea can lead to digestive problems.21 When someone is sleep-deprived, as is often the case with insomnia and sleep apnea, the body won’t be repairing, healing, and regrowing tissues as it should.2 Importantly, these processes occur in the digestive system, meaning that not getting enough sleep can exacerbate existing digestive problems and even cause new ones to emerge.

What causes nighttime bowel movements?

A digestive system that’s not operating properly can lead to a nighttime bowel movement or even diarrhea.6 Unfortunately, the conditions discussed thus far don’t typically cease to exist just because you are sleeping. While a normal digestive system would slow down and work on restoration while you sleep, a troubled one may continue to churn, making it more likely that you’ll have to get up in the middle of the night to use the restroom.

How can I digest food at night?

Your digestion continues even at night while you sleep. Here are some ways you can accelerate and ease the digestive process:

  • Drink plenty of water, at least 11.5 – 15.5 cups per day35.
  • Consume fresh, unprocessed foods.
  • Eat slowly, chew your food, and relax while you eat.
  • Don’t overeat.
  • At night, keep meals small.

Can anxiety cause gas pain?

Yes, anxiety puts the body in a fight-or-flight response, temporarily halting digestion. As a result, undigested foods can sit in the stomach causing gas pain and other forms of discomfort.12

What is the best sleep position for digestion?

The best sleeping position for digestion is sleeping on your left side.27  Sleeping on your left side lets gravity naturally help your digestive system as the stomach sits on the left side of the body. This way, waste will travel more easily from the small intestine to the large intestine.


While you may not think sleep and digestion are closely connected, the two can certainly impact one another. If you’re experiencing digestive issues that are impacting your sleep, try some of the tips we mentioned above as these can help set you up for success when it comes to better sleep and digestion.

If you try these and are still having issues, we advise consulting with your healthcare provider to create a more personalized plan to help you rest easier.


  1. “Your Digestive System & How it Works”. National Institute of Diabetes and Digestive and Kidney Disease. Last modified December 2017. 
  2. “Your Body is Busy During Sleep”. Centers for Disease Control and Prevention. Last modified March 31, 2020. 
  3. “Blood Glucose (Sugar) Test”. Cleveland Clinic. Last modified November 16, 2022. 
  4. “Is Eating Before Bed Bad for You?”. Cleveland Clinic. 2022. 
  5. Olsen, Jeff. “Mayo Clinic Minute: Timing snacks to avoid heartburn”. Mayo Clinic. 2017. 
  6. “What is inflammatory bowel disease (IBD)?”. Centers for Disease Control and Prevention. Last modified April 13, 2022. 
  7. “How sleep deprivation can cause inflammation”. Harvard Health Publishing. 2022. 
  8. Khanijow MD, Vikesh., et al. “Sleep Dysfunction and Gastrointestinal Diseases”. National Library of Medicine. 2015.
  9. Yang, Chia-Lun., Schnepp, Jerry., Tucker, Robin M. “Increased Hunger, Food Cravings, Food Reward, and Portion Size Selection after Sleep Curtailment in Women Without Obesity”. National Library of Medicine. 2019. 
  10. Salfi, Federico., et al. “Effects of Total and Partial Sleep Deprivation on Reflection Impulsivity and Risk-Taking in Deliberative Decision-Making”. National Library of Medicine. 2020. 
  11. “Stress and Sleep”. American Psychological Association. 2013. 
  12. “Understanding the stress response”. Harvard Health Publishing. 2020. 
  13. “Which Hormones Affect Sleep? 5 Hormones to Know About”. Sleep Centers of Middle Tennessee. 2022.
  14. Grivas, Theodoros B., Savvidou, Olga D. “Melatonin the “light of night” in human biology and adolescent idiopathic scoliosis”. National Library of Medicine. 2007.
  15. “Serotonin”. Cleveland Clinic. Last modified March 18. 2022.  
  16. “Indigestion”. Mayo Clinic. Last modified July 7, 2024. 
  17. Yun, Byung-Yoon., et al. “Association Between Insomnia and Constipation: A Multicenter Three-year Cross-sectional Study Using Shift Workers’ Health Check-up Data”. ScienceDirect. 2022. 
  18. “Constipation”. Cleveland Clinic. Last modified July 18, 2024. 
  19. “Acid Reflux / GERD Overview”. American College of Gastroenterology. Webpage accessed August 3, 2024. 
  20. “Heartburn”. Mayo Clinic. Last modified May 13, 2022. 
  21. Buchanan PhD, Diana T., et al. “Sleep measures predict next-day symptoms in women with irritable bowel syndrome”. National Library of Medicine. 2014. 
  22. “Ulcerative Colitis”. National Institute of Diabetes and Digestive and Kidney Disease. Webpage accessed August 3, 2024. 
  23. “Addressing poor sleep quality to improve IBD health outcomes”. Crohn’s & Colitis Foundation. 2020.  
  24. “Ulcerative Colitis vs Crohn’s Disease”. UCLA Health. Webpage accessed August 3, 2024. 
  25. “How sleep deprivation can cause inflammation”. Harvard Health. 2022.
  26. “Eats to Help You Sleep”. Northwestern Medicine. Webpage accessed August 3, 2024. 
  27. Howard, Beth. “What’s the Best Sleeping Position for Your Health?”. AARP. 2022.
  28. “Blue light has a dark side”. Harvard Health. 2020. 
  29. Berger, Mary. “What is So Amazing About Using Herbs to Promote Gut Health?”. Maryland University of Integrative Health. Last modified February 11, 2021. 
  30. “Sleep Anxiety”. Cleveland Clinic. Last modified June 13, 2021. 
  31. Cofer, Ari. “Why You Wake Up in the Night (And How to Stop)”. UW Medicine. 2022. 
  32. “The 10 Most Common IBS Triggers”. Gastrointestinal Specialists, Inc. Webpage accessed August 3, 2024. 
  33. “6 Foods That Help You Sleep”. Cleveland Clinic. 2022. 
  34. Jenkins, Trisha A., et al. “Influence of Tryptophan and Serotonin on Mood and Cognition with a Possible Role of the Gut-Brain Axis”. National Library of Medicine. 2016.
  35. “Water: How much should you drink every day?”. Mayo Clinic. Last modified October 12, 2022.
Natalie Grigson

Natalie Grigson


About Author

Natalie is a content writer for Sleep Advisor with a deep passion for all things health and a fascination with the mysterious activity that is sleep. Outside of writing about sleep, she is a bestselling author, improviser, and creative writing teacher based out of Austin.

Combination Sleeper