Waking up in the middle of the night to poop may be a sign of infections, dietary habits, or digestive diseases. The urge to poop is often strongest after waking or in the morning.
Sometimes, waking up to poop is a sign of a bacterial or viral infection. Symptoms happen suddenly, so a bout of diarrhea may wake you up at night if you are sick.
Viral gastroenteritis, commonly known as the “stomach flu,” causes symptoms like:
- Diarrhea
- Fever
- Nausea or vomiting
- Stomach cramps
Bacterial gastroenteritis, or food poisoning, is another cause of sudden diarrhea, stomach cramps, and vomiting.
Typically, gastroenteritis goes away on its own within a couple of days.
Some drinks and foods may cause diarrhea and increase the urge to poop, waking you up at night.
Avoid or limit these drinks and foods to relieve diarrhea:
- Alcohol
- Caffeine
- Candy and gum made with certain sweeteners (e.g., maltitol, mannitol, sorbitol, and xylitol)
- Dairy products (e.g., cheese, ice cream, and milk)
- Fatty, greasy foods
- Fructose
- Some food additives (e.g., emulsifiers)
- Some fruits (e.g., apples, peaches, and pears)
- Spicy foods
Sleep deprivation increases inflammation in your body. Ongoing inflammation may raise your risk of digestive diseases like inflammatory bowel disease (IBD) and irritable bowel syndrome (IBS).
IBD, which includes Crohn’s disease and ulcerative colitis, causes gut inflammation. IBS causes constipation, diarrhea, or both.
What the Science Says: A 2022 study found that nearly 75% of people with IBD reported having poor sleep, which worsened their symptoms. Waking up to poop and other IBD-related symptoms negatively affected sleep.
Certain medications may affect your gut microbiome. For example, antibiotics may affect the balance of gut bacteria. As a result, some people may have diarrhea.
Other medications that may affect your gut microbiome include chemotherapy drugs and non-steroidal anti-inflammatories (NSAIDs) like ibuprofen.
Having a lot of stress can affect your bowel habits and make you wake up to poop. This link is known as the gut-brain axis, in which stress hormones stimulate the intestines and may cause the urge to poop.
The urge to poop early in the morning or soon after waking up is common. Your colon has an internal clock, much like your sleep–wake cycle. Waking up stimulates movement in your colon.
What the Science Says: Morning habits like drinking coffee and eating breakfast may cause bowel movements. Research has shown that coffee decreases the time until your first bowel movement after waking up.
If you regularly wake up to poop, it may be time to seek medical attention.
See a doctor if you notice other worrisome symptoms, such as:
- Black poop
- Blood or pus in your poop
- Diarrhea with a high fever
- Ongoing stomach pain
Quality sleep helps protect against waking up to poop in people with digestive diseases.
Ways to improve your sleep schedule include:
- Avoid taking naps, or limit naps to 20–30 minutes before noon.
- Establish a bedtime routine with a consistent schedule and relaxing rituals.
- Go to bed and wake up at the same time every day.
- Only use your bed for sex and sleep.

