Skip to main content
young fashionable woman in pyjamas with pizza box in bed at home

What causes nighttime stomach cramps?

Stomach pain - often described as a dull ache in your tummy - can have various causes. It usually doesn't last long, and is generally not serious. Stomach cramps, on the other hand, can differ from the fleeting nature of general stomach pain.

Unlike an ache or pain that's there one minute and gone the next, stomach cramps are characterised by sudden, involuntary tightening of the tummy muscles - or spasms - that are more intense and cyclic. These cramps can be uncomfortable and may be accompanied by other digestive symptoms, such as bloating, nausea, vomiting, or diarrhoea.

Nighttime stomach cramps can be especially disruptive, as they happen when you're trying to rest. Because they're the sole focus of your attention, they can often seem more severe than they might during the day.

Continue reading below

What can cause nighttime stomach cramps?

Knowing the causes of nighttime stomach cramps could help you avoid getting them - or at least have a better idea of when to seek medical help.

Too much, too little, too late

Eating a lot of food close to bedtime - or not eating enough throughout the day - might lead to nighttime stomach cramps. Sometimes these two causes can even overlap.

Angel Luk, a registered dietitian and nutritionist from Vancouver, Canada says: "You're more likely to get nighttime stomach cramps if you go all day without eating, become famished by evening, then eat a larger amount of food before bed.

"In contrast, if you restrict your eating, and don't provide your body with enough nourishment throughout the day, you may experience hunger pains that can also feel like cramps."

Double board-certified psychiatrist and sleep medicine specialist, Dr Chester Wu, Texas USA, adds that your digestive system slows down during sleep, which can exacerbate conditions like constipation or gastroesophageal reflux disease (GERD). This is more simply known as acid reflux - a condition where your stomach acid flows back up into your oesophagus, leading to heartburn and tummy discomfort.

Wu says: "Eating fatty or spicy foods, and drinking alcohol and caffeine too close to bedtime can make these symptoms worse. Drink more water and eat smaller meals in the evening, making sure to avoid foods that trigger your cramps."

Food intolerances

One of the most common causes of nighttime stomach cramps is an undiagnosed food intolerance. When someone has a food intolerance without realising it, this could lead to digestive issues.

Luk says: "Even if you experience discomfort eating or drinking certain foods, you may continue to consume them, unaware that the food and symptoms are connected.

"A typical example might be a habit of drinking a cup of milk at bedtime since childhood - not realising your body's production of the lactase enzyme has decreased, leading to lactose intolerance."

Wu says: "Individual sensitivities to specific foods like dairy or gluten are sometimes more intense at night - especially after larger or richer meals."

Stress and sleep disruption

Long-term stress and lack of sleep can negatively impact digestion, causing discomfort and cramps. When your body is tense from stress your tummy muscles can become strained, which exacerbates your cramps. Additionally, stress can trigger the release of cortisol - your body's stress hormone. This can increase stomach acid production, and often result in heartburn and tummy discomfort.

"Stress and poor sleep can also create a vicious cycle, where poor digestion worsens sleep quality," says Wu. "This, in turn, increases the likelihood of stomach issues."

Luk suggests engaging in mindful practices before bed - such as meditation - to reduce the symptoms of stress-related stomach cramps.

Period pains

Menstrual cramps - a common source of discomfort for women - can cause pain before or during your period. This pain occurs as your womb contracts, causing moderate to sometimes severe cramps that can radiate from your tummy to your back and thighs.

Underlying health conditions

Long-term stomach cramp symptoms may be caused by a range of underlying health issues, such as irritable bowel syndrome (IBS).

"People living with IBS often deal with stomach cramps at unpredictable times of the day," says Luk. "The triggers are not exclusive to food, as stress can also lead to unwanted cramps at often the most inconvenient times - like when you’re trying to get a good night’s rest."

"Stress or low-quality sleep can also worsen IBS," adds Wu.

Other potential underlying causes of stomach cramps include:

When should someone seek medical attention for night-time stomach cramps?

If your stomach cramps - and their associated symptoms - don't get better, you should have them checked out by a doctor to see if you have any hidden health conditions.

Luk advises if your cramps are persistent or severe, you should seek medical attention as soon as possible.

She explains: "This is because the potential causes of your discomfort could be anything from non-life-threatening issues such as lactose intolerance to something much more serious like coeliac disease."

If your cramps are accompanied by the following symptoms, then you should seek immediate help.

  • A sudden and severe increase in tummy pain.

  • Difficulty swallowing.

  • Diarrhoea or constipation that lasts for more than a few days.

  • Blood in your poo.

  • Significant weight loss.

  • A persistent fever.

  • Nausea, or vomiting blood.

  • Waking from sleep due to pain.

  • Significant weight loss.

  • Yellowing of the skin and eyes.

These symptoms don't necessarily indicate a serious health problem. However, they may need to be managed with appropriate treatment or personalised medical advice to address the underlying causes.

Article history

The information on this page is peer reviewed by qualified clinicians.

flu eligibility checker

Are you protected against flu?

See if you are eligible for a free NHS flu jab today.

symptom checker

Feeling unwell?

Assess your symptoms online for free