What Causes Heartburn? Triggers, Foods & More

Heartburn happens when stomach acid flows backward into your esophagus, the tube connecting your mouth to your stomach. A ring of muscle at the bottom of your esophagus normally stays closed to keep acid where it belongs, but when that muscle relaxes at the wrong time or becomes too weak, acid escapes upward and irritates the esophageal lining. The result is that familiar burning sensation behind your breastbone. An estimated 10 to 20% of adults in Western countries experience it regularly.

How the Valve Between Your Stomach and Esophagus Works

The muscle ring at the base of your esophagus, called the lower esophageal sphincter, stays contracted most of the time. When you swallow food, it relaxes for about 6 to 10 seconds to let the food pass into your stomach, then tightens again. This is normal and doesn’t cause heartburn.

The problem starts with something called transient relaxation. Your sphincter occasionally opens on its own, usually triggered by your stomach stretching after a meal. This relaxation is actually a built-in safety valve that lets excess gas escape (it’s how you belch). But these episodes last longer than swallowing-related relaxation, sometimes 10 to 45 seconds, and during that window, stomach acid can wash upward into the esophagus. In healthy people, the esophagus pushes the acid back down quickly. In people prone to heartburn, acid lingers longer and causes damage to the esophageal lining.

This transient relaxation is the single most common mechanism behind heartburn and acid reflux. It happens in everyone, but it happens more frequently, or with more acid exposure, in people with chronic reflux.

Foods and Drinks That Trigger It

Certain foods don’t just sit in your stomach. They actively weaken the sphincter or increase acid production. High-fat meals, alcohol, chocolate, and carbonated beverages all reduce sphincter pressure and increase the amount of time acid sits in the esophagus. Mint has a similar relaxing effect on the sphincter muscle.

Other foods irritate the esophageal lining directly. Citrus fruits, tomatoes, onions, garlic, and spicy foods don’t necessarily weaken the sphincter, but they provoke symptoms in an already-sensitive esophagus. Caffeinated beverages like coffee and tea are common triggers as well. The specific combination of foods that causes problems varies from person to person, which is why keeping a food diary can help you identify your personal triggers rather than eliminating everything at once.

Body Weight and Abdominal Pressure

Carrying extra weight, especially around your midsection, is one of the strongest risk factors for heartburn. Abdominal fat increases the pressure inside your abdomen, which pushes against your stomach and forces its contents upward toward the esophagus. This elevated pressure also disrupts the physical barrier that normally prevents reflux. The relationship is mechanical: more abdominal fat means more force working against a sphincter that can only resist so much pressure. Even moderate weight gain can increase reflux symptoms, and losing weight is one of the most effective non-medication strategies for reducing them.

How Pregnancy Causes Reflux

Heartburn typically shows up in the second or third trimester, and most pregnant people experience it at some point. Two things are working against you. First, rising progesterone levels relax the esophageal sphincter, making it easier for acid to escape. Progesterone also slows digestion overall, which means food sits in the stomach longer and produces more acid. Second, the growing uterus pushes upward against the stomach, physically compressing it and increasing the chance of backflow. These two factors combined make pregnancy one of the most reliable triggers for heartburn, even in people who’ve never had it before.

Hiatal Hernia

Your diaphragm, the large muscle separating your chest from your abdomen, wraps around the base of your esophagus and reinforces the sphincter. In a hiatal hernia, part of your stomach pushes up through the opening in the diaphragm into your chest cavity. This separates the sphincter from the diaphragm’s supportive grip, and the further apart they get, the worse the reflux tends to be. Research shows that increasing separation between these two structures is associated with significantly more reflux episodes, more acid exposure in the esophagus, and stronger symptom severity. Small hiatal hernias are common and often cause no symptoms, but larger ones can make heartburn persistent and harder to control.

Medications That Make It Worse

Some medications irritate the esophagus directly as they pass through it. Common culprits include ibuprofen and aspirin, certain antibiotics, iron supplements, and osteoporosis drugs taken by mouth. If a pill gets stuck or dissolves slowly in your esophagus, it can cause a localized chemical burn that feels identical to heartburn.

A separate group of medications doesn’t irritate the esophagus but weakens the sphincter itself. Blood pressure medications like calcium channel blockers and nitrates, certain antidepressants, sedatives, opioid painkillers, and overactive bladder medications all relax the sphincter as a side effect. If your heartburn started or worsened after beginning a new medication, the timing may not be a coincidence. Changing the dose, switching to an alternative, or adjusting when you take the medication can sometimes resolve the problem.

Eating Habits and Timing

It’s not just what you eat. When and how you eat matters. Large meals stretch the stomach more, which triggers more of those transient sphincter relaxations that allow acid to escape. Eating within two to three hours of lying down is one of the most reliable ways to provoke nighttime heartburn, because gravity is no longer helping keep acid in your stomach.

Sleeping position plays a measurable role. Sleeping on your left side results in fewer reflux episodes and less acid exposure compared to sleeping on your right side or on your back. One study found 80 total reflux episodes in left-side sleepers versus 109 in right-side sleepers during the same time period. Elevating the head of your bed adds another layer of protection by using gravity to keep acid down. Combining left-side sleeping with head elevation appears to be the most effective positional strategy for nighttime symptoms.

When Heartburn Mimics a Heart Attack

Heartburn and heart attacks can feel remarkably similar, and even doctors can’t always distinguish them from symptoms alone. Heartburn typically produces a burning sensation in the chest that starts after eating, worsens when lying down, and improves with antacids. You may notice a sour taste in your mouth or feel a small amount of stomach contents rising into your throat.

A heart attack is more likely to feel like pressure, tightness, or squeezing in the chest that may spread to your neck, jaw, or arms. It often comes with shortness of breath, cold sweat, lightheadedness, or sudden fatigue. But many heart attacks don’t follow the textbook pattern, and heartburn itself can accompany cardiac symptoms. If your chest pain is new, unusually severe, or comes with any of those additional symptoms, treat it as a cardiac emergency rather than assuming it’s acid reflux.

What Happens With Chronic Heartburn

Occasional heartburn is uncomfortable but harmless. Chronic, untreated reflux is a different story. When stomach acid repeatedly contacts the esophageal lining over months or years, it can cause a condition where the normal esophageal tissue is replaced by a different type of tissue that’s more resistant to acid but also more prone to abnormal changes. In one study of 140 patients with this condition who were followed for nearly six years, about 31% developed mild abnormal cell changes, and 5% progressed to more serious changes or esophageal cancer. The annual risk of developing esophageal cancer in people with chronic tissue changes is estimated at 0.2 to 2.0%, which is 30 to 125 times higher than in the general population. This progression is uncommon, but it’s the reason persistent heartburn that occurs more than twice a week deserves medical evaluation rather than long-term self-treatment with over-the-counter antacids.