Heartburn When Fasting: Causes and How to Stop It

Your stomach keeps producing acid on a schedule whether you eat or not, and that acid sitting in an empty stomach is the main reason fasting can trigger heartburn. The relationship between fasting and reflux is more nuanced than most people expect, though. Research suggests that fasting itself may actually reduce the amount of acid that reaches your esophagus compared to eating days, yet many people swear they feel worse when they skip meals. The gap between the data and the experience comes down to a handful of aggravating factors that are easy to control once you know what they are.

Why Your Stomach Makes Acid Even When It Is Empty

Gastric acid secretion does not simply switch on when food arrives and shut off when the stomach empties. Your body produces hydrochloric acid in a roughly 24-hour cycle driven by internal clocks, not just by the presence of food. Studies in both healthy subjects and people with duodenal ulcers have confirmed a statistically significant circadian rhythm in acid output under fasting conditions, with secretion peaking in the late evening and overnight hours regardless of whether anything was eaten.1PubMed. Circadian rhythm of gastric acid secretion in men with active duodenal ulcer Animal research shows the same basic pattern: acid and the stomach’s protective bicarbonate each follow their own daily rhythm, and those rhythms peak at different times.2PubMed. Circadian rhythms of acid and bicarbonate efflux in fasting rat stomach

When food is in the stomach, it acts as a buffer. It absorbs and dilutes the acid, raises the pH, and gives the acid something to work on. Remove the food and the acid is left pooling against your stomach lining and, if the valve at the top of your stomach relaxes at the wrong moment, splashing up into your esophagus. That is the fundamental mechanism behind fasting heartburn: not that your body makes more acid than usual, but that the acid it was always going to make has nothing to neutralize it.

Does Fasting Actually Make Reflux Worse?

Here is the part that surprises most people. When researchers have put pH monitors inside people’s esophaguses during fasting and non-fasting days, the fasting days often look the same or even slightly better. One study of patients with suspected gastroesophageal reflux disease found that acid exposure in the esophagus averaged about 3.5% of total time on fasting days compared with about 4.3% on non-fasting days, and symptom scores for heartburn and regurgitation dropped during the fasting period.3PubMed. The Impact of Intermittent Fasting on Patients With Suspected Gastroesophageal Reflux Disease A cross-sectional study looking at intermittent fasting habits in a university community found no statistically significant link between intermittent fasting and reflux symptoms at all.4Jurnal Kesehatan dan Kedokteran. Intermittent Fasting and GERD Symptoms: A Cross-Sectional Study in a Medical Faculty Academic Community

This makes physiological sense. The most common trigger for acid to enter the esophagus is a transient relaxation of the lower esophageal sphincter, the muscular ring that seals the top of the stomach. Those relaxations happen far more often after eating, when the stomach is full and distended, than when it is empty. In fasting subjects, the sphincter tends to stay closed more reliably.5PubMed. Characteristics of lower esophageal sphincter relaxation induced by pharyngeal stimulation with minute amounts of water

So if fasting does not necessarily increase reflux by objective measurement, why does it feel like it does? The answer usually lies not in the fast itself but in what surrounds it: what you drink during the fast, how stressed you are, and especially what and when you eat once the fast ends.

How Breaking the Fast Creates a Rebound

Research on Ramadan fasting offers a useful window here, because millions of people fast for roughly 14 to 15 hours each day for a month, then eat concentrated meals in the evening and pre-dawn hours. A study tracking heartburn severity in reflux patients found that the overall heartburn score was higher during Ramadan than after it ended. The pattern pointed not at the hours of fasting but at the meals themselves: large, fatty Iftar meals eaten at sunset, followed by going to bed within a couple of hours of the pre-dawn Suhoor meal.6PubMed Central. Impact of Ramadan Fasting on the Severity of Symptoms Among a Cohort of Patients With Gastroesophageal Reflux Disease (GERD) The fasting window itself was not the problem. The heavy meals and the short interval between eating and lying down were.

This pattern applies well beyond religious fasting. If you practice time-restricted eating and then try to cram a day’s calories into a single large meal, you are filling and distending the stomach in one go, which triggers more sphincter relaxations and gives acid more opportunity to escape upward. Eating a big meal and then lying down within two hours compounds the issue, because gravity is no longer helping keep acid where it belongs.

Things That Make Fasting Heartburn Worse

Several common habits during a fast can tip the balance from “slightly less reflux than usual” to “genuine burning.” The main ones are worth knowing because they are all modifiable.

  • Coffee and caffeine: Many people who fast still drink black coffee or tea. Caffeine stimulates gastric acid secretion and weakens the lower esophageal sphincter, creating a combination that makes reflux more likely on an already-empty stomach.7PubMed. Gastric acid secretion and lower-esophageal-sphincter pressure in response to coffee and caffeine If you notice heartburn mainly in the morning after your first cup, the coffee is a more plausible culprit than the fast itself.
  • Nicotine: Tobacco smoking is well-established as a driver of esophageal acid exposure because it increases the number of reflux events. Early evidence suggests vaping may act through the same nicotine-mediated pathway, though the gastrointestinal effects of e-cigarettes have not been studied as thoroughly.8PubMed Central. Vaping-associated esophagitis
  • Carbonated drinks and acidic beverages: Sparkling water, diet soda, and citrus-based drinks during a fasting window add volume and acidity to an empty stomach. If you are only consuming liquids during a fast, acidic ones are the worst choice.
  • Lying down during the fast: Napping or lounging horizontally after hours without food puts any pooled acid at the level of your esophageal sphincter. Even a small amount of acid can reach the esophagus when you are flat.

Stress also plays a role, though its mechanism is different. Psychological stress does not reliably increase acid secretion, but it can make the esophagus more sensitive to normal amounts of acid, meaning the same level of reflux that you would not notice on a relaxed day might feel like burning on a stressful one.

Practical Steps to Prevent Heartburn While Fasting

You do not have to choose between fasting and comfort. Most fasting-related heartburn responds well to simple adjustments.

If coffee is part of your fasting routine, try switching to a low-acid variety or simply drinking it later in the fasting window rather than first thing in the morning, when overnight acid is already elevated. Some people find that a small amount of plain water first, followed by coffee 30 minutes later, reduces the sting. If heartburn persists, moving coffee to your eating window is the most reliable fix.

When you break your fast, eat a moderate-sized meal rather than a feast. High-fat meals slow gastric emptying, meaning your stomach stays full and distended for longer, which increases the window for reflux. Splitting your calories across two smaller meals within your eating window, if your fasting schedule allows it, reduces the volume sitting in the stomach at any one time.

Timing your last meal matters as much as what you eat. Try to finish eating at least two to three hours before lying down. If your fasting protocol requires a pre-dawn meal, sit upright for as long as possible afterward. A systematic review and meta-analysis found that sleeping on your left side reduces esophageal acid exposure compared to the right side. The anatomy explains this: when you lie on your right, the esophageal opening sits below the pool of gastric acid, essentially pouring acid toward the valve. Lying on your left reverses that arrangement.9PubMed Central. Left lateral decubitus sleeping position is associated with improved gastroesophageal reflux disease symptoms: A systematic review and meta-analysis Elevating the head of your bed by a few inches works on the same gravity principle.

Chewing sugar-free gum during the fast can help, since chewing stimulates saliva, and saliva is mildly alkaline. Research on bicarbonate-containing gum shows it raises salivary pH, which helps neutralize small amounts of acid that reach the esophagus.10PubMed Central. Effect of Chewing Bicarbonate-containing Sugar-free Gum on the Salivary pH: An in vivo Study Some stricter fasting protocols consider gum to break a fast, so check your own guidelines, but from a reflux standpoint it is one of the simplest countermeasures.

Over-the-counter antacids or acid reducers taken before the fasting window begins can also blunt acid production during the fast. If you know you are going to fast for an extended period and heartburn has been an issue before, taking a dose the night before or in the early morning can preempt the problem.

Bile Reflux During Fasting

Not all fasting-related burning comes from acid. During prolonged fasting, bile produced by the liver can flow backward from the small intestine into the stomach and potentially up into the esophagus. Bile reflux produces a slightly different quality of discomfort, often described as a bitter or soapy taste rather than the classic sour burn of acid reflux, and it does not respond to antacids the way acid reflux does.

After gastric surgery, researchers found that measuring bile acids in fasting stomach aspirates was a useful way to identify patients with symptomatic bile reflux. Symptomatic patients showed bile acid levels above a threshold that was absent in asymptomatic patients.11Gut. Measurement of bile acids in fasting gastric aspirates: an objective test for bile reflux after gastric surgery While this specific study focused on post-surgical patients, bile reflux can occur in anyone with a fasting stomach. If your heartburn has an unusual quality, does not improve with standard acid-suppressing medication, or comes with nausea, bile reflux is worth considering.

When the Burning Is Not Actually Reflux

A common trap with fasting heartburn is assuming that any chest or upper-abdominal burning must be caused by acid washing into the esophagus. Research on patients who report heartburn alongside other upper gut symptoms like bloating or early fullness has found that the majority of those patients do not have objective evidence of reflux at all. In one study, only about 29% of patients with overlapping reflux and dyspepsia symptoms had measurable acid exposure that qualified as gastroesophageal reflux disease. The most common diagnosis was functional heartburn, where the esophagus perceives burning despite normal acid levels.12PubMed Central. Overlapping Reflux Symptoms in Functional Dyspepsia Are Mostly Unrelated to Gastroesophageal Reflux

This matters for fasters because the empty-stomach gnawing or burning that many people interpret as heartburn may actually be functional dyspepsia, hunger signaling, or esophageal hypersensitivity amplified by stress. The practical difference is real: standard acid-blocking medications work much less well for functional heartburn. That same study found response rates to proton pump inhibitors were significantly lower in the group with overlapping symptoms, even among those who did have measurable reflux.12PubMed Central. Overlapping Reflux Symptoms in Functional Dyspepsia Are Mostly Unrelated to Gastroesophageal Reflux If over-the-counter acid medications are not helping your fasting discomfort, the problem may not be acid at all, and a conversation with a gastroenterologist about motility testing or pH monitoring would be more useful than escalating to stronger acid suppressants.

Fasting With Diabetes or a Compromised Stomach Lining

Most of the reassuring evidence about fasting and reflux comes from otherwise healthy individuals. People with diabetes face a different set of risks. Animal research on diabetic mice showed that an 18-hour fast reduced the protective mucus layer coating the stomach and caused visible hemorrhagic stomach lesions, effects that did not occur in non-diabetic animals under the same fasting conditions. When exposed to an irritant like ethanol after the fast, the diabetic animals developed far more severe stomach damage, and the damage worsened with longer duration of diabetes.13PubMed. Fasting induces impairment of gastric mucosal integrity in non-insulin-dependent diabetic (db/db) mice

These are animal data, so the findings do not translate directly to humans, but the underlying biology is relevant. If you have diabetes and notice that fasting triggers more stomach pain or burning than you would expect, the issue may go beyond simple acid reflux. The mucosal barrier that protects the stomach lining from its own acid can be compromised by metabolic disease, and fasting may stress that barrier further. People on medications that irritate the stomach lining, like nonsteroidal anti-inflammatory drugs, face a parallel concern: taking those drugs during a fast removes the buffering effect of food, concentrating the irritant against exposed mucosa.

The Ghrelin Myth

You may have read that ghrelin, the “hunger hormone” that rises during fasting, weakens the lower esophageal sphincter and promotes reflux. The idea has intuitive appeal: you fast, ghrelin surges, the valve loosens, acid splashes up. But when researchers tested this directly by exposing lower esophageal sphincter muscle strips to ghrelin, they found no effect on sphincter tone at all. Neither the active form of ghrelin nor its inactive form altered how tightly the sphincter contracted.14PubMed. Lack of direct effects of acyl ghrelin, des-acyl ghrelin, and obestatin on rat lower esophageal sphincter motility in vitro So while ghrelin makes you feel hungry during a fast, it does not appear to be the reason you get heartburn. The culprits are the more mundane factors already discussed: acid with no food buffer, caffeine, lying down, and overeating when the fast ends.

The Esophagus Has Its Own Defenses

Your esophagus is not entirely defenseless against acid. It has a pre-epithelial barrier, a thin layer of mucus, bicarbonate, and growth factors that sits on the surface of the esophageal lining and neutralizes small amounts of acid before they can damage the tissue beneath. In healthy people, this barrier handles the minor acid exposures that happen throughout the day. In people with reflux disease, even those without visible erosions, the output of these protective factors is measurably lower than in healthy controls.15American Journal of Gastroenterology. The potential role of the esophageal pre-epithelial barrier components in the maintenance of integrity of the esophageal mucosa in patients with endoscopically negative gastroesophageal reflux disease

This helps explain why two people can fast the same way and one develops heartburn while the other does not. The person with a weaker esophageal barrier has less margin for error. For that person, even a modest amount of acid reaching the esophagus during a fast, an amount the other person would never notice, can produce symptoms. The practical takeaway is that if you consistently get heartburn during fasts despite following all the usual advice, you may have an inherently more vulnerable esophagus rather than an unusually acidic stomach, and that distinction affects which treatments are worth trying.