Nighttime abdominal pain, sometimes called stomach pain, can occur for various reasons. Often, it is due to gas or other digestive issues, but there may be a more severe underlying cause, such as gallstones.

Here, learn about some common causes of nighttime abdominal pain and how to manage or treat it.

Night portrait. A man in profile. Starry sky in background depicting stomach pain at nightShare on Pinterest
happyphoton/Getty Images

Digestive problems are considered the most common cause of abdominal pain at night.

Eating close to bedtime means digestion is more likely to occur while lying down, making it easier for stomach acid to travel back up the digestive tract.

Sleeping difficulties and sleep disorders can make conditions like ulcer disease, irritable bowel syndrome (IBS), and inflammatory bowel disease (IBD) more likely or worse.

Lying down can also increase pressure on some muscular, joint, or bone injuries, making pain and discomfort more intense.

Here are some common causes of nighttime abdominal pain:


Gas in the digestive tract is a common cause of abdominal pain. It can lead to distention, bloating, and discomfort. It leaves the body through belching or passing gas.

Gas usually enters the body when people swallow gas, for example, when smoking, chewing gum, eating quickly, or consuming fizzy drinks. Certain bacteria in the gut also produce gas when they break down carbohydrates. Sometimes, it results from a medical condition, such as IBD or food sensitivity.

What can I do about flatulence?

Acid reflux

Acid reflux is when stomach acids travel up into the food pipe. It can cause a burning sensation, nausea, vomiting, gas, bloating, sore throat, and a cough.

Various factors may increase the risk of acid reflux, such as:

  • high alcohol consumption
  • overeating, especially close to bedtime
  • lying down too soon after eating
  • being overweight
  • high-fat, spicy, and fried foods, along with chocolate and coffee

What are some home remedies for heartburn and acid reflux?

Gastroesophageal reflux disease

Gastroesophageal reflux disease (GERD) is a common cause. Conditions that inflame the food pipe cause heartburn, nausea, and indigestion. Symptoms often intensify when lying down.

Which diet is good for people with GERD?


Gastritis is when the stomach walls become irritated and inflamed. This can lead to a sense of pain or burning, as well as nausea, vomiting, and gas. Untreated cases can lead to ulcers, bleeding, and cancer.

What should you eat and avoid with gastritis?

Stomach and intestinal, or peptic, ulcers

Stomach ulcers and intestinal ulcers can cause a burning sensation in the stomach region. Pain can worsen after eating, as well as when the stomach is empty. Nighttime is often the longest stretch of the day between meals.

Causes include:

Learn more about peptic ulcers.


The gallbladder is a small organ beneath the liver that releases bile. Secretions can build up and form hardened lumps called gallstones.

Gallstones can range in size from a speck of sand to a golf ball. Pain occurs when gallstones cause a blockage in the duct system of the gallbladder, liver, or pancreas.

Fatty or rich meals can worsen gallstone symptoms since bile helps the body digest fat.

Some individuals with gallstones have no symptoms and do not need medical help. People with recurring gallbladder pain or inflammation may need surgery to remove the gallbladder.

As well as pain, gallstones can also cause the following complications:

What can people eat for a healthy gallbladder?

Irritable bowel syndrome

Some people with irritable bowel syndrome (IBS) experience nighttime abdominal pain.

Symptoms include abdominal pain and changes in bowel movements. Having a large evening meal may worsen nighttime abdominal pain in individuals with IBS.

Around 5–10% of people have IBS, and most are under 50.

What should you eat with IBS?

Celiac disease

An allergy to gluten, a protein in wheat, barley, rye, and spelt, causes inflammation of the small intestine, often with cramping and abdominal pain. Genetic factors probably underlie the allergy.

Symptoms typically relate to the digestive system and include diarrhea, tiredness, and bloating. However, some people have no symptoms.

Without diagnosis or treatment, complications can arise. They include dental problems, delayed puberty, mood changes, and reduced growth due to vitamin and mineral deficiencies.

Around 1 in 100 people globally have celiac disease, but around 30% do not have a diagnosis.

What is a gluten-free diet?

Crohn’s disease

Crohn’s disease is a type of IBD. It is an inflammation of the digestive tract lining that causes diarrhea, abdominal pain, weight loss, anemia, and fatigue, among other symptoms.

Experts do not know why it develops, but it may be due to an autoimmune reaction or genetic factors. Smoking may also increase the risk.

Which foods should people avoid during a Crohn’s flare-up?

Menstrual cramps

Cramping, bloating, gas, and discomfort are common during menstruation as the uterine lining sheds.

Symptoms range from mild to severe and may affect the back and legs. There may also be nausea, vomiting, headaches, and other symptoms.

What is the best way to manage menstrual cramps?


With endometriosis, tissue similar to endometrial tissue grows outside the uterus. This can cause severe or persistent pain, bleeding and spotting, and digestive problems. It can make it harder to become pregnant.

Endometriosis may affect over 11% of females aged 15–44 in the United States.

Can home remedies help with endometriosis?

Food intolerances

Individuals with a food intolerance have a sensitivity to certain foods and cannot properly digest or process them. They may experience pain, bloating, diarrhea, and gas. Symptoms usually start soon after eating the food but may appear up to 48 hours later.

Lactose intolerance is a common food intolerance that causes severe abdominal cramping and pain.


Constipation makes it difficult to pass stool. As a result, waste products build up in the colon, leading to distention, pain, and pressure throughout the abdomen. Stools will be hard, dry, and difficult to pass.

Constipation can happen for many reasons, including dietary factors, certain medications, or an underlying health condition.

Which foods can help relieve constipation?

Often, nighttime abdominal or stomach pain is not a reason for immediate concern. Severe or persistent symptoms, however, need medical attention.

People also should seek medical advice if they have additional symptoms, such as:

Sometimes, sudden severe abdominal pain can indicate a more serious condition that requires medical attention.

These conditions include:

In the case of any of these conditions, medical evaluation is important to receive a proper diagnosis and treatment.

The table shows some treatments and home remedies for conditions that cause abdominal pain at night.

ConditionTreatment optionsHome remedies
gasmedications to reduce gas or address an underlying health conditionavoiding swallowing air, for example, by eating slowly; eating smaller meals more often; avoiding foods that cause gas
GERD, acid reflux, indigestion, heartburn H2 blockers, proton pump inhibitors (PPIs), surgery, endoscopymaintaining moderate weight; sleeping with head raised; avoiding smoking; making dietary changes
gastritisdepending on the cause: PPIs, antibiotics to treat H. pylori, and othersavoid high alcohol intake, check for allergies, follow doctor’s advice when using iron supplements
stomach and intestinal ulcersPPIs; antibiotics to treat H. pyloriavoiding or stopping NSAIDs; avoiding alcohol
gallstonesgallbladder removal surgerymaintaining moderate weight; avoiding rapid weight loss
IBSmedication for diarrhea, constipation, and pain; probiotics; mental health therapieseating more fiber, avoiding gluten, following a low FODMAP diet, exercising, managing stress, getting enough sleep
celiac diseaseavoid glutenavoiding all products containing gluten
Crohn’s diseasemedication to manage symptoms, bowel rest for severe symptoms, surgery in some casesavoiding fizzy drinks and high fiber foods, staying hydrated, eating small meals more often
menstrual cramps NSAIDs for pain relief, birth control pillsapplying heat; doing exercise, such as yoga
endometriosisNSAIDs for pain relief; hormonal treatments; surgeryherbal teas (such as licorice or cinnamon) and supplements may help
food intoleranceavoid products containing the substance, such as lactose checking labels to avoid foods containing the substance; using alternatives, such as oat milk for people with a lactose intolerance
constipationlaxatives or stool softeners; changing existing medications; surgery, in some casesdietary fiber, water, and exercise may help

Tips for preventing and managing nighttime abdominal and stomach pain will depend on the cause.

They include:

  • avoiding eating close to bedtime
  • raising the head of the bed while sleeping
  • avoiding rich or fatty foods, coffee, or chocolate at night
  • avoiding or limiting alcohol consumption
  • avoiding overeating
  • using over-the-counter medications
  • asking a doctor about symptoms that could indicate an underlying condition

Here are some answers to questions people often ask about abdominal and stomach pain at night.

How do you calm a stomach ache at night?

It depends on the root cause. Stomach ache caused by gas can be calmed by avoiding certain foods or taking over-the-counter medication. Stomach ache caused by menstrual cramps can be calmed by NSAIDs or by applying heat.

What is the quickest way to make your stomach stop hurting?

A heat pad or hot water bottle can be a quick and effective way to relieve stomach ache. This can help relax the stomach muscles. If the stomach continues to hurt and is accompanied by other symptoms, a person should seek medical advice.

There are many possible causes of abdominal pain at night, ranging from gas from eating too fast to more serious conditions that may need surgery.

Tips that may help include eating smaller meals more often, avoiding eating too near bedtime, and eating more slowly.

Anyone with concerns about symptoms should seek medical advice. A doctor may recommend lifestyle changes or do tests to identify an underlying cause.

Read this article in Spanish.