What Causes Heartburn: Foods, Hernia, and More

Heartburn happens when stomach acid flows backward into the esophagus, irritating its lining and producing that familiar burning sensation behind the breastbone. The immediate culprit in most episodes is a momentary failure of the muscular valve between your stomach and esophagus, but what triggers that failure ranges from the meal you just ate to the shape of your anatomy to medications you might not suspect. The causes layer on top of each other in ways that explain why some people get heartburn once a year while others deal with it daily.

The Valve That Keeps Acid Where It Belongs

At the bottom of your esophagus sits a ring of muscle called the lower esophageal sphincter (LES). It stays closed most of the time, opening briefly when you swallow so food can pass into your stomach. Heartburn starts when this valve relaxes at the wrong moment, letting acidic stomach contents wash upward. These inappropriate openings, called transient lower esophageal sphincter relaxations, account for roughly 70 to 73 percent of all acid reflux episodes, making them the single biggest mechanical cause of heartburn in both healthy people and those with chronic reflux disease.1Journal of Neurogastroenterology and Motility. Specific Movement of Esophagus During Transient Lower Esophageal Sphincter Relaxation in Gastroesophageal Reflux Disease2PubMed. Characteristics and frequency of transient relaxations of the lower esophageal sphincter in patients with reflux esophagitis The remaining episodes come from a persistently weak sphincter or increased pressure in the abdomen pushing acid upward.

Everything else on the list of heartburn causes ultimately works through one of a few pathways: weakening the sphincter’s resting pressure, increasing the frequency of those transient relaxations, raising pressure inside the abdomen, or directly irritating the esophageal lining so that even a small amount of reflux feels worse than it otherwise would.

How a Hiatal Hernia Changes the Picture

A hiatal hernia occurs when the upper part of the stomach slides upward through the opening in the diaphragm where the esophagus passes through. This repositioning disrupts the normal anatomy in several ways at once: it lowers the resting pressure of the sphincter, increases how often those transient relaxations happen, and impairs the esophagus’s ability to clear acid back down into the stomach after a reflux event.3PubMed Central. A new mechanism of gastroesophageal reflux in hiatal hernia documented by high-resolution impedance manometry The diaphragm normally acts as a second squeeze point around the sphincter, reinforcing its seal. When the stomach herniates above the diaphragm, that backup support disappears.

Not everyone with a hiatal hernia gets heartburn, and not everyone with heartburn has a hernia. Small hernias often go unnoticed. But larger ones substantially raise the odds of chronic reflux because they compromise the anti-reflux barrier on multiple fronts simultaneously. If you have been told you have a hiatal hernia, it does not guarantee worsening symptoms, but it does explain why your reflux may be harder to control with diet changes alone.

Foods and Drinks That Trigger Reflux

Certain foods provoke heartburn not by making your stomach produce more acid (a common misconception) but by weakening the sphincter or irritating tissue that is already inflamed. The triggers vary from person to person, but a few have consistent research behind them.

Chocolate is one of the better-documented offenders. Studies have shown that eating chocolate cuts the sphincter’s resting pressure roughly in half, dropping it from a normal range down to levels where reflux becomes much more likely.4PubMed. The adverse effect of chocolate on lower esophageal sphincter pressure The combination of fat, caffeine, and theobromine in chocolate all contribute to this relaxation effect.

Spicy foods work through a different pathway. Rather than weakening the valve, capsaicin and similar compounds directly irritate the esophageal lining, which means they tend to worsen symptoms in people who already have some inflammation from ongoing reflux rather than triggering problems in someone with a perfectly healthy esophagus.5PubMed Central. Foods Inducing Typical Gastroesophageal Reflux Disease Symptoms in Korea If spicy meals only bother you sometimes, it may be because your esophagus is more inflamed during those periods.

Carbonated drinks cause a brief but measurable drop in esophageal pH and can temporarily reduce sphincter pressure.6PubMed. Systematic review: the effects of carbonated beverages on gastro-oesophageal reflux disease The gas itself also distends the stomach, which can promote those transient sphincter relaxations. Coffee, citrus, tomatoes, and peppermint round out the usual suspects, though the strength of evidence varies. The practical takeaway is that food triggers tend to fall into two camps: those that weaken the valve and those that irritate tissue already damaged by acid. Knowing which camp your trigger belongs to can help you figure out whether it is the food itself or an underlying reflux problem that needs attention.

Body Weight, Pregnancy, and Physical Pressure

Excess abdominal fat increases the pressure inside the abdomen, which physically pushes the sphincter open and steepens the pressure difference between your stomach and esophagus.7PubMed. Gastro-oesophageal reflux disease in obesity: pathophysiological and therapeutic considerations This is why heartburn often improves with weight loss even before dietary changes. The effect is mechanical: more tissue pressing on the stomach means more force pushing acid upward.

Pregnancy produces heartburn through a double hit. Rising levels of estrogen and progesterone progressively weaken the sphincter as pregnancy advances, while the growing uterus increases pressure on the stomach from below and slows the rate at which the esophagus clears acid.8PubMed Central. Evidence-based treatment recommendations for gastroesophageal reflux disease during pregnancy This explains why heartburn is uncommon in the first trimester but increasingly frequent in the third. The hormonal component is worth noting because it means the problem isn’t purely about the baby’s size pressing on the stomach; even early hormonal shifts begin relaxing the valve before the uterus is large enough to matter mechanically.

Smoking, Alcohol, and Other Lifestyle Factors

Both tobacco and alcohol reduce sphincter pressure, making reflux more likely. Smoking adds a second problem: it cuts saliva production, and saliva contains bicarbonate that naturally neutralizes acid that reaches the esophagus.9PubMed. Tobacco smoking, alcohol consumption and gastro-oesophageal reflux disease So a smoker not only refluxes more often but also clears acid less effectively once it gets there. Alcohol works primarily on the sphincter pressure side, though heavy drinking can also inflame the esophageal lining directly.

Sleep position plays a surprisingly large role in nighttime heartburn. Sleeping on your left side is associated with less acid exposure in the esophagus compared to sleeping on the right side or on your back.10PubMed Central. Left lateral decubitus sleeping position is associated with improved gastroesophageal reflux disease symptoms The anatomy explains this: when you lie on your left, the junction between the stomach and esophagus sits above the pool of stomach acid. When you lie on your right, that junction is essentially submerged. If nighttime heartburn is your main complaint, switching sides may help more than you’d expect. Elevating the head of the bed by about six inches works on a similar principle, using gravity to keep acid in the stomach.

Medications That Can Cause or Worsen Heartburn

Several common prescription and over-the-counter drugs promote reflux, and many people never connect their heartburn to something in the medicine cabinet. The mechanisms fall into two categories: drugs that relax the sphincter and drugs that directly damage the esophageal lining.

In the sphincter-relaxing camp, calcium channel blockers and nitrates (both used for heart conditions and high blood pressure) are well-established culprits.11PubMed. Acid-suppressive therapy use associated with antihypertensive agents Anticholinergic drugs, certain asthma medications, and benzodiazepines also lower sphincter pressure.12PubMed. Adverse effects of drugs on the esophagus If your heartburn appeared or worsened around the time you started a new medication, that connection is worth discussing with your prescriber.

In the direct-damage camp, NSAIDs like ibuprofen and aspirin reduce the protective mucus layer in the esophagus and stomach. In people who already have reflux, the lower pH in the esophagus makes these drugs even more damaging because the acidic environment helps the drugs penetrate the mucosal cells more easily.13PubMed Central. Drug-induced esophagitis and helpful management for healthcare providers Bisphosphonates, commonly prescribed for osteoporosis, can cause a chemical burn to the esophageal lining if they dissolve before reaching the stomach, which is why they come with instructions to take them with a full glass of water and remain upright for at least 30 minutes afterward.14Diseases of the Esophagus. Drug-induced esophagitis

Stress and the Brain-Gut Connection

People often say stress gives them heartburn, and the research supports this, though the mechanism is more complicated than “stress makes more acid.” Anxiety and chronic stress appear to increase heartburn symptoms through several overlapping routes: they can alter gut motility, increase esophageal sensitivity to normal amounts of acid, change mucosal barrier function, and widen the spaces between cells in the esophageal lining, which activates pain receptors.15PubMed Central. The association between symptoms of gastroesophageal reflux disease and perceived stress Stress can also modulate pain perception at the brain level, meaning the same amount of acid exposure feels worse when you are anxious than when you are calm.

This helps explain a frustrating experience many heartburn sufferers have: symptoms that persist or worsen during stressful periods even when diet and other habits haven’t changed. It also connects to the concept of reflux hypersensitivity, a condition where people experience typical heartburn symptoms despite having normal acid levels in the esophagus. Their esophagus is simply more sensitive to normal reflux events. This condition, along with functional heartburn (where symptoms occur without any detectable reflux correlation), accounts for more than 90 percent of heartburn patients who don’t respond to twice-daily proton pump inhibitor treatment.16PubMed Central. Reflux Hypersensitivity: A New Functional Esophageal Disorder If you have been taking acid-suppressing medication with little improvement, the problem may not be excess acid at all but rather heightened sensitivity in your esophagus.

Genetics and the Microbiome

Some people seem genetically primed for reflux problems. Research has identified several gene variants linked to increased risk of gastroesophageal reflux disease, including variations in genes involved in connective tissue development, immune regulation, and DNA repair.17PubMed Central. Risk factors for gastroesophageal reflux disease and analysis of genetic contributors This genetic component helps explain why some thin, healthy nonsmokers still develop chronic reflux, and why the condition runs in families even when family members have different diets and lifestyles.

An emerging area of research involves the microbiome of the esophagus and gut. Changes in microbial composition may contribute to reflux disease by activating inflammatory pathways and affecting the dynamics of the lower digestive tract.18PubMed Central. The role of the esophageal and intestinal microbiome in gastroesophageal reflux disease This research is still in its early stages, and no one is prescribing probiotics as a heartburn treatment based on current evidence. But it points toward an eventual understanding of reflux disease that goes beyond the mechanical model of a leaky valve and includes the immune and microbial environment of the esophagus itself.

When Heartburn Is Not Just Heartburn

The burning, pressure-like sensation of heartburn sits right behind the breastbone, which is also where heart-related chest pain shows up. In primary care settings, gastrointestinal causes account for a meaningful share of chest pain complaints, and the majority of those patients feel the pain in the same retrosternal location as cardiac pain.19BioMed Central. Heartburn or angina? Differentiating gastrointestinal disease in primary care patients presenting with chest pain A few features help distinguish the two: heartburn usually worsens after meals, when lying down, or when bending over, and it responds to antacids. Cardiac pain is more often triggered by exertion, may radiate to the arm, jaw, or back, and is accompanied by shortness of breath or sweating. But overlap exists, and neither you nor your doctor should assume burning chest pain is “just heartburn” without ruling out cardiac causes, especially if you have risk factors for heart disease or the pain is new, severe, or different from your usual symptoms.

Other conditions that mimic heartburn include eosinophilic esophagitis (an allergic inflammation of the esophagus), esophageal motility disorders where the muscle contractions that push food down become discoordinated, and gastroparesis where the stomach empties too slowly. If standard heartburn treatments don’t help, one of these alternatives may be the real diagnosis.

What Happens When Reflux Goes On Too Long

Occasional heartburn is unpleasant but not dangerous. Chronic, untreated reflux is a different matter. Persistent acid exposure can erode the esophageal lining, leading to inflammation (esophagitis), ulcers, and eventually scarring that narrows the esophagus and makes swallowing difficult. The most concerning long-term consequence is Barrett’s esophagus, a condition where the normal lining of the esophagus transforms into a different type of tissue in response to years of acid damage. Barrett’s esophagus increases the risk of esophageal adenocarcinoma, a form of cancer.20Human Pathology. Barrett’s esophagus, dysplasia, and adenocarcinoma

The absolute risk of developing cancer from Barrett’s esophagus is low in any given year, but it accumulates over time, which is why gastroenterologists recommend surveillance endoscopies for people with the condition. The broader point is that heartburn should not simply be normalized. If you need antacids more than twice a week or have had symptoms consistently for months, getting evaluated makes sense, not because cancer is likely but because treatments can prevent the escalation of damage and improve quality of life considerably.

Why Heartburn Often Has More Than One Cause

One reason heartburn can be so persistent and variable is that it rarely comes from a single source. A person might have a mildly weak sphincter (maybe genetically influenced), a modest hiatal hernia, a few extra pounds around the midsection, a daily coffee habit, and a stressful job. No single factor would cause much trouble on its own, but layered together they produce reflux that flares unpredictably. A heavy meal after a stressful day while wearing tight-waisted clothing might push the system past its threshold, while the same meal on a relaxed day does nothing.

This layering effect is why the standard advice to “avoid trigger foods” falls short for many people. It is not wrong, but it addresses one layer when several are stacked. Thinking about heartburn causes as a stack rather than a single villain helps explain why different strategies work for different people. Some get relief from losing weight. Others find that managing anxiety helps more than any dietary change. Some discover that switching a blood-pressure medication resolves what they thought was a food problem. And for plenty of people, a combination approach that addresses two or three layers at once is what finally makes a real difference.