How to Sleep Better With a Stomach Ulcer

Peptic ulcers are sores that form in the lining of your stomach or in the first part of the intestine called the duodenum. They are usually caused by Helicobacter pylori (H. pylori) or non-steroidal anti-inflammatory drugs (NSAIDs) and can be aggravated by stress, medications, and food.

These sores are easy to diagnose, but can get worse without treatment. This article will explore the common symptoms of stomach ulcers, why they might feel worse at night, and how your sleep position can relieve ulcer-related pain.

Woman holding stomach in bed

Burak Karademir / Getty Images

Improving Sleep

Sleep is crucial to maintaining gastrointestinal tract health. Stomach ulcers can affect sleep quality, and poor sleep can make ulcers worse or cause them to return.

One study found that people who slept nine or more hours each night had lower rates of stomach ulcers than those who slept seven hours. This suggests that sleep can have a protective effect against stomach ulcers.

Stomach ulcers can disturb sleep for several reasons, and making a few simple changes may help to improve sleep quality and accelerate healing.

Sleeping Positions

Sleep habits can affect digestive system disorders like ulcers and gastroesophageal reflux disease (GERD), two conditions that are often confused with one another. Making changes to your sleep habits can help ease symptoms of both.

Increased stomach acids from stress, spicy foods, and medications can exacerbate symptoms of GERD and peptic ulcers. These acids build up the most after eating, so if you eat late at night, discomfort can worsen when you sleep. Avoiding late-night snacks or meals may help ease symptoms.

Changing your sleep position and sleeping upright uses gravity to help control the movement of stomach acids and may bring some relief.

If discomfort is caused partly by GERD, lying on your left side can help move your stomach contents more quickly into the rest of your digestive tract.

Additional research is needed to find the best sleep position for people prone to stomach ulcers.

Medications

Your first instinct to manage the pain of a stomach ulcer may be to reach for an over-the-counter (OTC) pain reliever but using NSAIDs is one of the leading causes of stomach ulcers. If you have a history of peptic ulcers or are at risk of developing an ulcer, talk to your healthcare provider about your NSAID use and consider alternative ways to manage your pain.

Your healthcare provider can prescribe antibiotics if you have an ulcer caused by the H. pylori bacteria. Other medications to reduce stomach ulcer pain focus on reducing stomach acid or protecting your stomach lining, such as:

  • Histamine receptor blockers (H2 blockers) like Pepcid or Zantec (famotidine) and Tagamet (cimetidine)
  • Proton pump inhibitors (PPI) like Prilosec (omeprazole), Nexium (esomeprazole), Prevacid (lansoprazole), and Protonix (pantoprazole)
  • Antacids
  • Mucosal protective agents like Carafate (sucralfate)

Medications like Pepcid and Prilosec can be purchased OTC, but others (Protonix) are only available with a prescription from a healthcare provider. Some people need a combination of medications and lifestyle changes to find relief.

Diet

Historically, it was felt that spicy or acidic foods could cause stomach ulcers, but evidence points to H. pylori and NSAID use as the primary causes.

This doesn't mean that diet does not affect symptoms or how ulcers progress. Eating triggers the production of stomach acids. Consuming a big meal or certain foods can increase the acid in your stomach and aggravate an ulcer. This may be especially true at night due to the positioning of the stomach and the movement of acids.

Alcohol and caffeine contribute to stomach ulcer pain and poor sleep quality. Avoiding certain foods that trigger ulcer pain and limiting eating before bed can help relieve ulcer pain and improve sleep.

Sleep Hygiene

You can also try to improve your sleep with better sleep hygiene, which can begin with eliminating distractions. The Centers for Disease Control and Prevention (CDC) recommends taking the following steps to get better sleep.

  • Create a space for sleep: Make sure your sleeping space is dark, quiet, and relaxing.
  • Cut out screens: Televisions, computers, phones, tablets, and other electronic devices can make it more challenging to get a good night's sleep. Removing these items from your bedroom can reduce distractions.
  • Consistency is key: Going to bed and waking up at the same time each day is good for sleep.
  • Cut back on snacks and drinks: Avoiding large meals, late-night snacks, caffeine, and alcohol before bed can help you sleep better.
  • Stay active: Regular exercise during the day and avoiding daytime napping can help you get more restful sleep at night.

Symptoms of Stomach Ulcers

The stomach and digestive tract are lined with delicate mucus membranes. Once damaged, this tissue can be easily aggravated, causing pain and other symptoms. A healthcare provider can diagnose the cause of your pain by asking about symptoms like:

  • Pain or discomfort between meals or when you eat
  • Stomach pain that wakes you from your sleep
  • Becoming full quickly when you eat
  • Bloating
  • Burning or dull pain in your stomach
  • Pain that comes and goes over days or weeks
  • Discomfort that lasts several minutes to hours

More severe ulcers may cause:

Risk Factors for Stomach Ulcers

NSAID use and H. pylori infections are the most common causes of stomach ulcers, but there are risk factors that can increase your chances of developing these injuries. These risk factors damage or weaken your stomach lining and make your tissues more vulnerable to ulcer development. Risk factors include:

When to See a Healthcare Provider

In most cases, ulcers will heal with treatment. If left untreated, they could get worse and lead to complications like:

Schedule an appointment with your healthcare provider if you think you have a stomach ulcer.

Seek Immediate Treatment

If you develop any of the following symptoms, seek immediate medical treatment:

  • Vomiting bright red blood or dark material resembling coffee grounds
  • Bloody or tarry-looking stools
  • Nausea or vomiting that gets worse over time
  • Severe dizziness or weakness
  • Sudden or severe pains that extend to your back

Summary

Stomach ulcers affect more than 4 million Americans yearly, and 1 in 10 people will develop one in their lifetime. Ulcers aren't rare. Still, they can lead to serious complications if left untreated. Good sleep is an important preventive tool. Talk to your healthcare provider about the best treatment for a stomach ulcer.

A Word From Verywell

Stomach ulcers are small wounds that can develop in your digestive tract. Bacteria and medications can cause ulcers, and poor sleep habits can contribute to symptoms. Ulcer pain can wake you up at night and cause problems with your sleep, so getting a good night's rest is important for preventing and managing peptic ulcers. Your healthcare provider can help you find the right combination of medications and lifestyle changes to treat stomach ulcers and improve sleep.

Frequently Asked Questions

  • Will stomach ulcers go away on their own?

    Stomach ulcers will eventually heal, usually only after medication and lifestyle changes. Untreated ulcers can lead to more serious complications like bleeding.

  • Does stomach ulcer pain get worse at night?

    Some people may be awakened by stomach ulcer pain at night, especially with certain sleep and eating habits. Stomach acids don't cause ulcers, but they can irritate them. Avoiding late night snacking and sleeping with your head elevated can help.

16 Sources
Verywell Health uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. Harvard Health. Peptic ulcer.

  2. Fang B, et al. Impact of subjective and objective sleep quality on peptic ulcer rebleeding in older adults, psychosomatic medicine. Psychosom Med. 2021;83(9):995-1003. doi:10.1097/PSY.0000000000001001.

  3. Zha LF, et al. Effects of insomnia on peptic ulcer disease using Mendelian randomization. Oxid. Med. Cell. Longev. 2021;2021:2216314. doi:10.1155/2021/2216314.

  4. Ko SH, Baeg MK, Ko SY, Han KD. Women who sleep more have reduced risk of peptic ulcer disease; Korean National Health and Nutrition Examination Survey (2008-2009). Sci Rep. 2016;6:36925. doi:10.1038/srep36925.

  5. UCLA Health. Two commonly confused conditions.

  6. Sleep Foundation. GERD and sleep.

  7. Drini M. Peptic ulcer disease and non-steroidal anti-inflammatory drugs. Aust Prescr. 2017;40(3):91-93. doi:10.18773/austprescr.2017.037

  8. Johns Hopkins Medicine. Stomach and duodenal ulcers (peptic ulcers).

  9. MedlinePlus. H2 blockers.

  10. MedlinePlus. Proton pump inhibitors.

  11. National Institutes of Health. Treatment for peptic ulcers (stomach ulcers).

  12. Cedars Sinai. Ulcers.

  13. MedlinePlus. Peptic ulcer.

  14. Centers for Disease Control and Prevention. Tips for better sleep.

  15. FamilyDoctor.org. Ulcers.

  16. Lee SP, Sung IK, Kim JH, Lee SY, Park HS, Shim CS. Risk factors for the presence of symptoms in peptic ulcer disease. Clin Endosc. 2016;50(6):578-584. doi:10.5946/ce.2016.129

By Rachael Zimlich, BSN, RN
Rachael is a freelance healthcare writer and critical care nurse based near Cleveland, Ohio.