Why Do We Get Heartburn? Causes, Triggers & Relief

Heartburn happens when stomach acid flows backward into the esophagus, irritating a lining that was never designed to handle it. The burning sensation behind your breastbone is not actually about the heart at all. It starts at the junction between your stomach and esophagus, where a ring of muscle called the lower esophageal sphincter normally keeps acid where it belongs. When that barrier fails, even briefly, acid creeps upward and you feel it. The reasons that barrier fails are surprisingly varied, and so are the ways to fix it.

The Valve That Keeps Failing

Your lower esophageal sphincter (LES) is a muscular ring at the bottom of your esophagus that opens to let food into your stomach and then squeezes shut. The most common reason acid escapes upward is something called transient lower esophageal sphincter relaxation, a brief, involuntary opening of that valve that has nothing to do with swallowing. Everyone experiences these relaxations. They are, in fact, the body’s way of venting gas from the stomach. But in people with frequent heartburn, these relaxations happen more often or last longer, and they let acid through along with the gas.1PubMed. Transient lower esophageal sphincter relaxations do not result from passive opening of the cardia by gastric distention This is recognized as the primary mechanism behind gastroesophageal reflux disease (GERD), the chronic form of heartburn that goes beyond the occasional post-pizza discomfort.2Journal of Neurogastroenterology and Motility. Specific Movement of Esophagus During Transient Lower Esophageal Sphincter Relaxation in Gastroesophageal Reflux Disease

Beyond those transient relaxations, the LES itself can be structurally weak. Some people simply have lower resting pressure in that sphincter, which means it does not seal as tightly even when it is not actively relaxing. When the sphincter pressure is low and its abdominal length is short, acid has an easier path upward. These structural issues can exist from birth or develop over time.

Hiatal Hernia and Anatomy

A hiatal hernia occurs when part of the stomach pushes upward through the diaphragm, the sheet of muscle separating the chest from the abdomen. This matters for heartburn because the diaphragm normally wraps around the LES, giving it extra squeezing power. When a hernia disrupts that arrangement, three things happen at once: the sphincter weakens, transient relaxations become more frequent, and the esophagus has a harder time clearing acid once it gets in.3PubMed Central. A new mechanism of gastroesophageal reflux in hiatal hernia documented by high-resolution impedance manometry: a case report

The size of the hernia matters. Patients with larger hernias show weaker sphincter pressure, more acid exposure in the esophagus, and more severe mucosal damage compared to those with small or no hernias.4PubMed. Hiatal hernia size affects lower esophageal sphincter function, esophageal acid exposure, and the degree of mucosal injury Research has found that both a defective LES and the presence of a hiatal hernia are independent predictors of abnormal acid exposure, meaning either one alone raises your risk, and having both compounds the problem.5PubMed. Role of the lower esophageal sphincter and hiatal hernia in the pathogenesis of gastroesophageal reflux disease Many people have small hiatal hernias and never know it. They only become clinically relevant when they start interfering with that anti-reflux barrier enough to produce symptoms.

Why Certain Foods Set It Off

Dietary triggers are probably what most people think of first when they think of heartburn, and for good reason. Fat, coffee, chocolate, spicy foods, beer, and wine have all been shown to provoke reflux, though each works through slightly different pathways. Fatty meals slow stomach emptying and increase the perception of reflux symptoms. Coffee and chocolate directly increase acid exposure in the lower esophagus. Spicy food triggers heartburn too, though the exact mechanism remains unclear. Alcohol, particularly beer and wine, induces reflux primarily in the first hour after drinking.6PubMed Central. Food and Gastroesophageal Reflux Disease

The tricky part is that dietary advice for heartburn is not well defined in clinical guidelines. Acid-suppressing drugs remain the mainstay of GERD treatment, with dietary therapy playing a supporting role that varies from person to person.7Journal of Thoracic Disease. The role of diet in the development and management of gastroesophageal reflux disease: why we feel the burn This means you will not find a single universal “heartburn diet.” The foods that bother you depend on your particular anatomy, sphincter function, and sensitivity. Keeping a food diary for a couple of weeks is genuinely more useful than following a generic list, because the triggers are individual enough that blanket restrictions are unnecessarily restrictive for most people.

How Slow Digestion Makes Things Worse

When your stomach empties slowly, food and acid sit around longer, creating more opportunities for reflux. This is not just theoretical. Studies using gastric emptying scans have found that slow emptying of the upper part of the stomach correlates with more acid exposure in the esophagus and more reflux episodes per hour. Interestingly, it is specifically the rate of proximal (upper) stomach emptying that matters, not total stomach emptying speed, and this effect is independent of sphincter pressure.8Gut. Gastric emptying: a contributory factor in gastro-oesophageal reflux activity?

Severely delayed gastric emptying can also promote a type of reflux that is not primarily acidic but still reaches the upper esophagus and causes symptoms.9Journal of Neurogastroenterology and Motility. Severe Delayed Gastric Emptying Induces Non-acid Reflux up to Proximal Esophagus in Neurologically Impaired Patients This partly explains why some people continue to feel heartburn even on strong acid-suppressing medication. The reflux itself has not stopped; it is just less acidic. If you are on medication and still symptomatic, delayed emptying could be a contributing factor worth discussing with your doctor.

Excess Weight and Abdominal Pressure

Carrying extra weight around the midsection physically squeezes the stomach. Abdominal fat transmits gravitational force into the abdominal cavity, raising pressure inside. Studies measuring intra-abdominal pressure directly have confirmed that obese patients have higher pressures than non-obese patients, and this pushes stomach contents toward the esophagus.10PubMed Central. Obesity & GERD That increased pressure also promotes the development of hiatal hernias, setting up a feedback loop where obesity worsens anatomy that was already vulnerable.

The relationship between obesity and GERD goes beyond simple mechanics. Increased abdominal pressure relaxes the sphincter, exposing the esophageal lining to stomach contents.11PubMed Central. Gastro-esophageal reflux disease and obesity, where is the link? This is why weight loss is one of the most consistently recommended lifestyle changes for people with chronic heartburn, and why the effect tends to be proportional: the more weight lost, the more symptoms improve.

Pregnancy and Hormonal Changes

Up to about 80% of pregnant women experience heartburn, and it tends to get worse as pregnancy progresses. Two things drive this. First, elevated progesterone levels relax the sphincter, reducing its ability to stay shut. Second, the growing uterus physically pushes the stomach upward and increases abdominal pressure, similar to the obesity mechanism but on a faster timeline.12PubMed Central. Heartburn, Nausea, and Vomiting During Pregnancy The hormonal component is particularly notable because it means heartburn can start in early pregnancy, well before the uterus is large enough to exert meaningful mechanical pressure. Progesterone levels rise from early on, softening smooth muscle throughout the body, including the LES.

Medications That Can Trigger or Worsen Heartburn

Some prescription and over-the-counter drugs are known heartburn culprits, working through two distinct pathways. The first group relaxes the sphincter’s smooth muscle, making reflux more likely. This includes certain calcium channel blockers like nifedipine, nitrates, theophylline, nicotine, sildenafil, and drugs with anticholinergic properties.13PubMed. Medication-induced oesophageal disorders The second group damages the esophageal lining directly if pills get stuck or dissolve in the esophagus. NSAIDs and aspirin, certain antibiotics like doxycycline and clindamycin, bisphosphonates used for osteoporosis, potassium chloride supplements, and iron tablets can all produce local ulcers and inflammation.14PubMed. Adverse effects of drugs on the esophagus

If you take any of these medications and experience new or worsening heartburn, do not stop them on your own. But it is worth taking pills with a full glass of water and staying upright for at least 30 minutes afterward, particularly with bisphosphonates and tetracycline antibiotics. These are standard precautions precisely because the esophageal irritation risk is well-documented.

The Stress Connection

Stress does not cause your stomach to produce more acid, but it changes how you perceive the acid that is already there. In a study where GERD patients were exposed to an auditory stressor while acid was infused into their esophagus, the time it took them to feel symptoms dropped and the intensity of the discomfort they reported went up, even though the actual acid exposure was identical to a non-stress condition.15PubMed. The effect of auditory stress on perception of intraesophageal acid in patients with gastroesophageal reflux disease The acid did not change; the brain’s interpretation of it did.

This heightened visceral sensitivity extends beyond acute stress. Patients with non-erosive reflux disease, where heartburn symptoms exist without visible damage to the esophagus, tend to have higher rates of anxiety and depression alongside increased sensitivity to esophageal stimuli.16PubMed. Increased visceral sensitivity, elevated anxiety, and depression levels in patients with functional esophageal disorders and non-erosive reflux disease This helps explain a common frustration: you can have debilitating heartburn with a perfectly normal-looking esophagus on endoscopy. The problem, in those cases, is as much about the brain-gut communication as it is about acid.

Sleep Position and Meal Timing

How you sleep has a measurable effect on nighttime reflux. A meta-analysis found that sleeping on your left side significantly reduces acid exposure time in the esophagus compared to sleeping on your right side or on your back. Right-side sleeping was no better than lying flat on your back.17PubMed Central. Left lateral decubitus sleeping position is associated with improved gastroesophageal reflux disease symptoms: A systematic review and meta-analysis The anatomy makes this intuitive: when you lie on your left, the stomach hangs below the esophageal junction, so acid pools away from the opening rather than toward it.

Raising the head of the bed, avoiding lying down soon after meals, and sleeping on the left side can all improve symptoms, particularly in people who already have a compromised sphincter or a hiatal hernia.18PubMed. Dietary factors involved in GERD management That said, the evidence linking late evening meals specifically to nocturnal reflux is complicated. One systematic review noted that the strength of that association was weakened by confounding factors, particularly what people ate in the evening, not just when they ate.19PubMed. A systematic review of the definitions, prevalence, and response to treatment of nocturnal gastroesophageal reflux disease A heavy, fatty late dinner probably matters more than eating a light snack before bed.

How Relief Options Actually Work

Over-the-counter heartburn remedies fall into a few categories, and understanding what each one does helps you pick the right tool for the moment.

Traditional antacids (calcium carbonate, magnesium hydroxide) work by chemically neutralizing acid already present in the stomach. They act fast but wear off quickly, and they do nothing to prevent future acid production. They are best for the occasional bout of heartburn after an indulgent meal.

Alginate-based products, commonly sold as Gaviscon in many markets, work quite differently. When an alginate meets stomach acid, it forms a gel. Bicarbonate in the formulation releases carbon dioxide that gets trapped in the gel, creating a buoyant foam “raft” that floats on top of your stomach contents. This raft acts as a physical barrier, moving into the esophagus ahead of acid during a reflux episode and reducing the number of reflux events.20PubMed. Review article: alginate-raft formulations in the treatment of heartburn and acid reflux It is a clever mechanical solution rather than a chemical one.

H2 blockers (famotidine, for example) reduce acid production by blocking one of the signals that tells stomach cells to secrete acid. They are more sustained than antacids but have limitations: they do not effectively block acid production triggered by meals, tolerance develops with regular use, and rebound acid production can occur after stopping them.21PubMed. Pharmacological and pharmacodynamic essentials of H(2)-receptor antagonists and proton pump inhibitors for the practising physician

Proton pump inhibitors (PPIs) like omeprazole are the strongest acid suppressors available and remain the most effective overall form of medical management for GERD.22PubMed. Gastroesophageal reflux disease: then and now They block the final step of acid production in the stomach lining. PPIs work best when taken 30 to 60 minutes before a meal, because they target actively secreting acid pumps. Taking them on an empty stomach at bedtime, a common mistake, reduces their effectiveness.

Long-Term Acid Suppression and Its Trade-Offs

PPIs are excellent at what they do, but long-term use has raised concerns. Observational studies have linked extended PPI use with a range of adverse effects including kidney problems, bone fractures, gut infections, and deficiencies in magnesium, vitamin B12, and calcium.23PubMed Central. Adverse Effects Associated with Long-Term Use of Proton Pump Inhibitors The proposed mechanisms vary. Fracture risk may relate to impaired calcium absorption when stomach acid is suppressed. Gut infections likely stem from changes in the stomach’s microbiome: by raising gastric pH, PPIs allow bacteria that normally cannot survive in acidic conditions to colonize, while reducing populations of beneficial short-chain fatty acid-producing bacteria.24PubMed Central. Rethinking Long-Term PPI Therapy in GERD: A Narrative Review from a Microbial Ecology Perspective Beyond Acid Suppression

Context matters here. Most of these associations come from observational data, which means they show correlation but cannot prove that PPIs directly cause these outcomes. For people with severe reflux, erosive esophagitis, or Barrett’s esophagus, the benefits of PPIs clearly outweigh the risks. The concern is more relevant for people using PPIs for mild symptoms over many years when a lower-intensity approach might suffice.25Journal of Neurogastroenterology and Motility. Potential Risks Associated With Long-term Use of Proton Pump Inhibitors and the Maintenance Treatment Modality for Patients With Mild Gastroesophageal Reflux Disease

When Heartburn Becomes Something More Serious

Chronic, untreated reflux can lead to a condition called Barrett’s esophagus, where the normal lining of the lower esophagus is gradually replaced by a different type of tissue that is better able to tolerate acid. This develops as a result of chronic acid and bile reflux and carries an increased risk of esophageal adenocarcinoma.26PubMed. Barrett’s Esophagus Roughly 10 to 15% of people with GERD develop Barrett’s, and the progression from Barrett’s to cancer follows a sequence from metaplasia to dysplasia to invasive carcinoma.27PubMed. Gastroesophageal reflux and Barrett’s esophagus: a pathway to esophageal adenocarcinoma

The absolute risk of any individual Barrett’s patient progressing to cancer is low, but the stakes are high enough that surveillance endoscopy is recommended for people diagnosed with it. The practical implication: if you have had frequent heartburn for years and have never had an endoscopy, particularly if you are male, over 50, or have a long history of symptoms, it is worth bringing up with a gastroenterologist. Barrett’s is treatable and manageable when caught early.

Surgical Options for Refractory Cases

When medications fail or someone prefers not to take acid suppressors indefinitely, surgery aims to rebuild the anti-reflux barrier itself. The standard approach is a Nissen fundoplication, where the top of the stomach is wrapped around the lower esophagus to reinforce the sphincter, combined with repair of the diaphragmatic opening. Partial wraps like the Toupet and Dor procedures accomplish the same goal with fewer side effects, particularly less difficulty swallowing and less gas bloating afterward. A newer alternative called magnetic sphincter augmentation uses a ring of magnetic beads placed around the esophagus that allows food through but prevents reflux.28PubMed Central. Individualizing the choice of surgical therapy for gastroesophageal reflux disease

Surgery is not for everyone, and the decision depends on severity, anatomy, and personal preferences. But for people with large hiatal hernias, persistent volume reflux that medication cannot address, or those facing decades of PPI use starting in their 30s or 40s, the surgical option can be genuinely life-changing.

Breathing Exercises as an Emerging Approach

One of the more unexpected areas of GERD research involves the diaphragm. Since the crural diaphragm is a key part of the anti-reflux barrier and is partially under voluntary control, researchers have tested whether strengthening it through targeted breathing exercises might help. The diaphragm, like any skeletal muscle, responds to training, and its dysfunction can be improved via breathing exercises.29PubMed Central. Breathing Exercises in Gastroesophageal Reflux Disease: A Systematic Review

In a randomized controlled trial, diaphragmatic breathing reduced the number of reflux events after meals by increasing the pressure difference between the sphincter and the stomach.30American Journal of Gastroenterology. Effects of Diaphragmatic Breathing on the Pathophysiology and Treatment of Upright Gastroesophageal Reflux: A Randomized Controlled Trial This is not a replacement for medication in severe cases, but it is a zero-cost, zero-risk addition that may help people with mild to moderate upright reflux. The technique involves slow, deep belly breaths that engage the diaphragm, typically practiced for 15 to 30 minutes a day. It is the kind of intervention that even if the effect is modest, the downside is essentially nothing.