What Causes Bad Heartburn, From Diet to Hernias

Bad heartburn happens when stomach acid flows backward into your esophagus, a tube that lacks the protective lining your stomach has. The burning sensation you feel is acid literally irritating unprotected tissue. But the real question is why this happens, and the answer involves a combination of mechanical failures, dietary triggers, body changes, and lifestyle factors that can stack on top of each other.

How Your Anti-Reflux Barrier Works

At the bottom of your esophagus sits a ring of muscle called the lower esophageal sphincter (LES). Think of it as a one-way valve: it opens to let food drop into your stomach, then closes to keep acid from splashing back up. This valve doesn’t work alone. Your diaphragm wraps around it, squeezing tighter whenever pressure in your abdomen rises (like when you cough or bend over). The angle where the esophagus meets the stomach also helps deflect contents downward. Together, these form a multi-layered barrier against reflux.

When any part of this system weakens, acid escapes. The most common mechanical failure is something called a transient relaxation of the LES. Unlike the brief relaxation that happens when you swallow (lasting 6 to 8 seconds), these spontaneous relaxations last more than 10 seconds and aren’t triggered by swallowing at all. They’re especially likely to occur within 15 minutes after eating, when a pocket of concentrated acid sits near the top of your stomach. If these relaxations happen frequently, acid leaks into the esophagus repeatedly throughout the day.

Why a Hiatal Hernia Makes It Worse

A hiatal hernia occurs when the upper portion of your stomach pushes up through the opening in your diaphragm. This disrupts the anti-reflux barrier in several ways at once. The LES, now sitting in your chest instead of your abdomen, loses the reinforcing squeeze from abdominal pressure. In fact, it moves into an area of lower pressure, which makes it less effective as a valve. The widened opening in the diaphragm also means the diaphragm’s own clamping action is weaker.

Perhaps most importantly, in people with a hiatal hernia, the acid pocket that normally sits below the diaphragm shifts above it, sometimes pooling inside the hernia sac itself. This means acid is already positioned to flow into the esophagus during any momentary relaxation. People with large hernia sacs experience reflux events significantly more often. A hiatal hernia also slows the esophagus’s ability to clear acid once it does splash upward, prolonging the burning sensation.

Excess Weight and Abdominal Pressure

Carrying extra weight around your midsection directly increases the pressure inside your abdomen, and that pressure pushes stomach contents toward the esophagus. In a study of morbidly obese patients, 77% had elevated intra-abdominal pressure, and over half had gastroesophageal reflux disease. The correlation was strong: as abdominal pressure climbed, so did the number of related health problems, including reflux.

This pressure effect explains why heartburn often worsens after weight gain, even modest amounts. Tight clothing, heavy lifting, and frequent bending can temporarily create similar pressure spikes. The difference with obesity is that the pressure is constant, keeping the LES under persistent stress throughout the day.

How Fatty and Spicy Foods Trigger Burns

High-fat meals are one of the most reliable heartburn triggers, and the mechanism is straightforward. Fat is the most potent inhibitor of gastric emptying. When fat reaches your small intestine, chemical sensors send signals back to the stomach telling it to slow down. The stomach relaxes and reduces its contractions, keeping food (and acid) sitting there longer. The longer your stomach stays full, the more opportunities acid has to reflux, especially during those spontaneous valve relaxations that peak after meals.

Spicy foods work through a different pathway. Capsaicin, the compound that makes peppers hot, activates a specific pain receptor in your tissue. This is the same receptor that responds to actual heat and to acidic environments, which is why the sensation feels like burning. Capsaicin triggers a localized inflammatory response in your esophagus and stomach lining, causing the release of inflammatory compounds that amplify pain and irritation. Symptoms range from a burning sensation in the upper digestive tract to full reflux, nausea, and chest pain.

Other common dietary triggers include citrus, tomatoes, chocolate, coffee, and carbonated drinks. Carbonation distends the stomach, which can prompt more frequent valve relaxations. Alcohol both relaxes the LES and can directly irritate the esophageal lining, creating a double effect.

Medications That Relax the Valve

Several common medications lower LES pressure as a side effect. Calcium channel blockers (used for high blood pressure), nitrates (used for chest pain), and theophylline (used for asthma) all relax smooth muscle, including the muscle forming your esophageal valve. If your heartburn started or worsened after beginning a new medication, this connection is worth exploring with your prescriber. Anti-inflammatory painkillers like ibuprofen and aspirin can also irritate the esophageal and stomach lining directly, compounding the problem.

Pregnancy and Hormonal Changes

Up to 80% of pregnant women experience heartburn, and hormones are a major reason why. Progesterone, which rises steadily throughout pregnancy, has a direct relaxing effect on smooth muscle. As progesterone levels climb, LES pressure progressively drops. By the third trimester, the growing uterus also increases abdominal pressure, pushing stomach contents upward. These two forces, hormonal and mechanical, combine to make late pregnancy one of the most intense periods of heartburn many people ever experience.

There’s evidence that progesterone-related reflux isn’t limited to pregnancy. Researchers have investigated whether the natural rise in progesterone during certain phases of the menstrual cycle may also lower LES tone enough to predispose some women to reflux symptoms.

Why Heartburn Gets Worse at Night

If your worst heartburn hits when you lie down, three things are working against you. First, gravity is no longer helping keep acid in your stomach. When you’re upright, acid has to travel uphill to reach your esophagus. Lying flat removes that advantage entirely. Second, your esophagus clears acid more slowly without gravity’s assist, meaning any acid that does reflux stays in contact with the tissue longer. Third, you swallow far less frequently during sleep. Each swallow pushes a small wave of saliva (which is slightly alkaline) down the esophagus, helping neutralize and clear acid. During sleep, this natural cleaning mechanism nearly stops.

This is why eating close to bedtime is a reliable recipe for nighttime heartburn. Your stomach is full of acid working to digest dinner, and you’re about to remove every protective advantage your body has against reflux. Waiting at least two to three hours after eating before lying down, and elevating the head of your bed by six inches, can make a noticeable difference.

When Heartburn Signals Something Deeper

Occasional heartburn is extremely common and usually harmless. Persistent heartburn, occurring multiple times per week for months or longer, is a different situation. Chronic acid exposure can change the cells lining your lower esophagus, a condition called Barrett’s esophagus. While many people with Barrett’s have a history of reflux, only a small percentage of people with chronic reflux develop it. And even among those with Barrett’s, the annual risk of progressing to esophageal cancer is low, between 0.12% and 0.33% per year.

That said, the progression from chronic irritation to cellular changes is the reason persistent, severe heartburn deserves attention rather than indefinite self-treatment. Other warning signs that suggest something beyond simple heartburn include difficulty swallowing, unintentional weight loss, or pain that doesn’t respond to standard acid-reducing medications.