Doctors Note Logo

Published on: 9/13/2026

Why does my stomach burn at night or after drinking coffee?

A burning stomach at night or after coffee is most often caused by acid irritating the lining of the stomach or esophagus, since caffeine and coffee's natural acids relax the valve at the top of the stomach and boost acid production, while lying down removes gravity's help in keeping acid down. Common culprits include acid reflux or GERD, gastritis, H. pylori infection, peptic ulcers, functional dyspepsia, hiatal hernia, late or large meals, alcohol, smoking, stress, and medications such as NSAIDs. Timing matters too, because pain that eases after eating or wakes you around 2 to 3 a.m. can point toward an ulcer, while burning that rises into the chest with a sour taste leans more toward reflux. Warning signs like vomiting blood, black stools, trouble swallowing, unexplained weight loss, or pain spreading to the jaw or arm need urgent medical care, and there are several other important factors to consider, so see below to understand more.

Because so many conditions share this same burning sensation, sorting out which one fits your pattern is difficult on your own, and the right next step differs greatly depending on whether the cause is dietary, an infection, or something more serious. A free, instant, online symptom check lets you enter your specific symptoms, timing, and triggers in a few minutes and receive information on possible causes along with guidance on whether to try lifestyle changes, book a primary care visit, or seek care right away. Taking a few minutes now can bring clarity and help you walk into any appointment better prepared.

Last reviewed for medical accuracy: 09/12/2026

answer background

Explanation

Why Your Stomach Burns at Night or After Drinking Coffee

A burning sensation in the upper abdomen—often called dyspepsia or “indigestion”—is a common complaint. You might notice it most when you lie down at night or shortly after sipping your morning (or afternoon) coffee. While unsettling, this feeling usually isn’t dangerous. Understanding what’s behind it can help you find relief and prevent future flare-ups.

What Is Dyspepsia?

Dyspepsia refers to discomfort in the upper digestive tract. It can include:

  • A burning sensation under the ribs or in the upper belly
  • Fullness, bloating, or a sense of pressure after eating
  • Early fullness (feeling stuffed after a few bites)
  • Nausea or mild upper-abdominal pain

There are two main types:
• Functional dyspepsia: No obvious cause on testing; linked to stomach sensitivity and delayed emptying.
• Organic dyspepsia: Caused by an identifiable issue—ulcers, inflammation (gastritis), hiatal hernia or, less commonly, more serious conditions.

Why It Burns at Night

Lying flat makes it easier for stomach acid to creep up into the esophagus. At night, several factors worsen reflux and dyspepsia:

  • Gravity is absent: Acid can travel upward more easily.
  • Saliva production decreases: Less natural “acid wash” of the esophagus.
  • Lower esophageal sphincter (LES) relaxes: Hormones released during sleep can loosen the LES.

Factors that contribute to nighttime burning:

  • Eating a heavy meal within 2–3 hours of bedtime
  • High-fat or spicy foods late at night
  • Alcohol or carbonated drinks close to sleep
  • Smoking before bed, which weakens the LES

Why Coffee Can Trigger Burning

Coffee is a major culprit for many people with dyspepsia or acid reflux. Key reasons include:

  • Acid content: Coffee’s natural acidity can directly irritate the stomach lining.
  • Caffeine: Stimulates acid production and relaxes the LES.
  • Additives: Milk, sugar or creamers can slow gastric emptying and worsen bloating in sensitive individuals.

Common coffee-related triggers:

  • Drinking large mugs in one sitting
  • Sipping on an empty stomach
  • Choosing dark-roast blends (higher acidity)
  • Adding high-fat creamers or sugar

Other Common Causes of Burning Sensation

Beyond coffee and nighttime habits, several factors can lead to dyspepsia:

  • Diet: Spicy, citrusy or fried foods
  • Stress and anxiety: Heightened gut sensitivity and acid production
  • Medications: Non-steroidal anti-inflammatory drugs (NSAIDs), certain antibiotics
  • Smoking: Increases acid, slows healing of any inflamed lining
  • Peptic ulcer disease: A sore in the stomach or duodenum caused by H. pylori bacteria or long-term NSAID use

Watch for “Red Flags”

Most dyspepsia is benign, but certain warning signs warrant prompt evaluation:

  • Unexplained weight loss
  • Difficulty swallowing or persistent chest pain
  • Vomiting blood or having black, tarry stools
  • Severe, constant abdominal pain
  • Anemia (fatigue, paleness)

If you experience any of these, seek medical attention right away.

Simple Lifestyle Changes

Small adjustments can often ease or prevent burning:

  • Eat smaller, more frequent meals
  • Avoid eating within 2–3 hours before lying down
  • Sleep with the head of your bed elevated 6–8 inches
  • Cut back on alcohol, tobacco and carbonated beverages
  • Keep a food diary to identify personal triggers

Over-the-Counter Options

For mild to moderate symptoms, you might try:

  • Antacids (Tums, Maalox): Neutralize stomach acid on contact
  • H2 blockers (ranitidine, famotidine): Reduce acid production for 6–12 hours
  • Proton pump inhibitors (omeprazole, lansoprazole): Stronger acid suppression, intended for short-term use

Always follow label instructions and consider consulting a pharmacist or doctor before starting new medications.

Alternative and Home Remedies

Some people find relief using gentle, food-based or herbal approaches:

  • Ginger: A natural anti-inflammatory that may calm upset stomach
  • Chamomile tea: Can soothe the digestive tract and promote relaxation
  • Aloe vera juice: May reduce irritation, but choose low-sugar varieties
  • Mind-body techniques: Deep breathing, mindfulness or gentle yoga to lower stress

Always discuss herbal or supplement use with a doctor, especially if you take other medications.

Check Your Symptoms Online

Not sure what’s behind your stomach burning? You might consider doing a free, online symptom check, using the doctor approved Ubie Symptom Checker.

When to See Your Doctor

If lifestyle tweaks and over-the-counter remedies aren’t enough—or if your symptoms worsen—schedule an appointment. Your physician may recommend:

  • Upper endoscopy (camera exam of your esophagus and stomach)
  • Testing for H. pylori infection
  • Prescription-strength acid reducers
  • Blood tests or imaging in special situations

Speak Up About Serious or Persistent Symptoms

While most burning sensations at night or after coffee stem from dyspepsia or reflux, always speak to a doctor about anything that could be life-threatening or serious. Your health and peace of mind are worth it.

(References)

  • * Panganamamula KV, Fisher RS, Parkman HP. Functional (Nonulcer) Dyspepsia. Curr Treat Options Gastroenterol. 2002 Apr;5(2):153-160. doi: 10.1007/s11938-002-0063-5. PMID: 11879596.

  • * Brady M, Kinn S, Stuart P. Preoperative fasting for adults to prevent perioperative complications. Cochrane Database Syst Rev. 2003;(4):CD004423. doi: 10.1002/14651858.CD004423. PMID: 14584013.

  • * Adam MP, Bick S, Mirzaa GM, Wallace SE, Amemiya A, McDonald-McGinn DM, Hain HS, Emanuel BS, Zackai EH. 22q11.2 Deletion Syndrome. 1993. PMID: 20301696.

  • * Surdea-Blaga T, Negrutiu DE, Palage M, Dumitrascu DL. Food and Gastroesophageal Reflux Disease. Curr Med Chem. 2019;26(19):3497-3511. doi: 10.2174/0929867324666170515123807. PMID: 28521699.

  • * Ried K, Travica N, Dorairaj R, Sali A. Herbal formula improves upper and lower gastrointestinal symptoms and gut health in Australian adults with digestive disorders. Nutr Res. 2020 Apr;76:37-51. doi: 10.1016/j.nutres.2020.02.008. 2020 Feb 8. PMID: 32151878.

  • * Zayegh AM, Davis PG. BPD treatments: The never-ending smorgasbord. Semin Fetal Neonatal Med. 2021 Apr;26(2):101223. doi: 10.1016/j.siny.2021.101223. 2021 Feb 25. PMID: 33674252.

  • * Taraszewska A. Risk factors for gastroesophageal reflux disease symptoms related to lifestyle and diet. Rocz Panstw Zakl Hig. 2021;72(1):21-28. doi: 10.32394/rpzh.2021.0145. PMID: 33882662.

  • * Nehlig A. Effects of Coffee on the Gastro-Intestinal Tract: A Narrative Review and Literature Update. Nutrients. 2022 Jan 17;14(2). doi: 10.3390/nu14020399. 2022 Jan 17. PMID: 35057580; PMCID: PMC8778943.

  • * Fox M, Gyawali CP. Dietary factors involved in GERD management. Best Pract Res Clin Gastroenterol. 2023 Feb-Mar;62-63:101826. doi: 10.1016/j.bpg.2023.101826. 2023 Feb 17. PMID: 37094911.

  • * Lee JY, Kim SE, Shin JE, Cha B, Na W, You HS, Kim YS, Diet, Obesity, and Metabolism Research Study Group under the Korean Society of Neurogastroenterology and Motility. [Gastroesophageal Reflux Disease]. Korean J Gastroenterol. 2025 Oct 25;85(4):440-450. doi: 10.4166/kjg.2025.115. PMID: 41132014; PMCID: PMC12580067.

Thinking about asking ChatGPT?Ask me instead

Tell your friends about us.

We would love to help them too.

smily Shiba-inu looking

For First Time Users

What is Ubie’s Doctor’s Note?

We provide a database of explanations from real doctors on a range of medical topics. Get started by exploring our library of questions and topics you want to learn more about.

Was this page helpful?

Purpose and positioning of servicesUbie Doctor's Note is a service for informational purposes. The provision of information by physicians, medical professionals, etc. is not a medical treatment. If medical treatment is required, please consult your doctor or medical institution. We strive to provide reliable and accurate information, but we do not guarantee the completeness of the content. If you find any errors in the information, please contact us.