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 that tube is supposed to seal shut after you swallow, but when it relaxes at the wrong time or weakens over time, acid escapes upward and burns the unprotected lining above it. Roughly 10 to 20% of adults in Western countries deal with this regularly, and the number is climbing worldwide.
The Muscle That’s Supposed to Keep Acid Out
At the junction where your esophagus meets your stomach sits a band of smooth muscle called the lower esophageal sphincter. It works like a one-way gate: opening to let food drop into the stomach, then closing to trap everything below, including hydrochloric acid with a pH around 1, which is strong enough to dissolve metal. Your stomach has a thick mucus lining that protects it from this acid. Your esophagus does not.
This sphincter is controlled by nerves and hormones, and several things can cause it to malfunction. Sometimes it relaxes spontaneously when it shouldn’t. Sometimes it weakens gradually from repeated pressure or damage. When either happens, acidic stomach contents rise into the esophagus, and that burning sensation behind your breastbone is your esophageal tissue reacting to an acid it was never built to handle. Research shows that even 30 minutes of acid exposure can start widening the spaces between cells in the esophageal lining, the first step toward irritation and inflammation.
What Makes the Sphincter Fail
Several forces can push that gate open or weaken it over time. The most common ones work through a surprisingly straightforward mechanism: pressure.
- Excess abdominal weight. Fat stored around the midsection increases pressure inside the abdomen, physically pushing stomach contents upward toward the esophagus. This pressure can also stretch and weaken the sphincter itself over time. Studies consistently show that heartburn severity increases with body mass index, and the relationship is strongest with belly fat specifically, not overall weight.
- Large meals and eating late. A full stomach creates more pressure against the sphincter. If you eat and then lie down before your stomach empties, you’re combining a full stomach with the loss of gravity’s help in keeping things down.
- Hiatal hernia. Your esophagus passes through a small opening in your diaphragm on its way to your stomach. In a hiatal hernia, part of the stomach pushes up through that opening into the chest cavity. This displaces the sphincter from its normal position and impairs its ability to close properly. Small hiatal hernias often cause no symptoms, but larger ones allow food and acid to back up freely.
- Pregnancy. Progesterone, the hormone that rises sharply during pregnancy, directly relaxes the sphincter muscle. It also slows digestion, keeping food in the stomach longer and giving acid more opportunity to escape. This is why heartburn typically appears in the second or third trimester, when progesterone levels are highest and the growing uterus adds upward pressure on the stomach.
Why Certain Foods and Habits Trigger It
Foods don’t cause heartburn by being acidic themselves (though that doesn’t help). The real issue is that certain foods and substances relax the sphincter or increase acid production. Coffee, alcohol, chocolate, peppermint, and fatty foods all promote sphincter relaxation through different chemical pathways. Spicy and acidic foods like tomatoes and citrus, meanwhile, can irritate an already-vulnerable esophageal lining even if the sphincter is working normally.
Smoking weakens the sphincter over time. Tight clothing around the waist increases abdominal pressure. Carbonated drinks introduce gas that expands the stomach and forces the sphincter open. These aren’t mysterious triggers. They all come back to either relaxing the muscle, increasing pressure below it, or both.
Why It Gets Worse at Night
If your heartburn flares up when you lie down, there’s a simple explanation: gravity stops helping. When you’re upright, gravity naturally pulls stomach contents downward, away from the sphincter. The moment you go horizontal, that advantage disappears and acid can pool at the junction between your stomach and esophagus.
Your sleeping position matters more than you might expect. Lying on your left side keeps the stomach below the esophageal opening due to the way these organs are arranged anatomically, so acid is less likely to escape. Sleeping on your right side does the opposite, positioning the stomach above the esophageal junction and promoting acid flow upward. Elevating the head of your bed by six to eight inches (not just propping up pillows, which can bend you at the waist and make things worse) uses gravity to your advantage all night.
Your Body’s Other Defenses (and How They Fail)
The sphincter isn’t your only line of defense against acid reflux. Your body has several backup systems, and heartburn often becomes a problem when more than one of them breaks down at once.
Your esophagus contracts in rhythmic waves to push any refluxed acid back down into the stomach. If those contractions weaken or become uncoordinated, acid sits in the esophagus longer and does more damage. Your saliva is mildly alkaline, so every time you swallow, you’re neutralizing a small amount of acid in the esophagus. This is one reason that heartburn can worsen during sleep: you produce far less saliva and swallow far less often. Even your stomach’s emptying speed plays a role. If the muscles of your stomach don’t contract normally, food and acid linger longer than they should, increasing the odds of reflux with every passing minute.
When Occasional Becomes Chronic
Most people experience heartburn occasionally, and that’s normal. It becomes a medical condition, gastroesophageal reflux disease, when it happens frequently, generally twice a week or more, or when it starts causing damage to the esophageal lining.
Chronic acid exposure changes the esophagus over time. The cells lining the lower esophagus can gradually transform to resemble intestinal cells, a condition called Barrett’s esophagus. About 3% of people with ongoing reflux disease develop this change. Barrett’s esophagus itself carries a small annual risk of progressing to esophageal cancer, roughly 0.1% to 0.3% per year when precancerous changes aren’t present. That risk is low for any individual, but it’s the reason persistent heartburn deserves attention rather than just ongoing antacid use.
Certain symptoms signal that reflux may have already caused significant damage: difficulty swallowing or a feeling that food is getting stuck behind your breastbone, vomiting blood or material that looks like coffee grounds, black or tarry stools, unexplained weight loss, or chronic coughing and hoarseness from acid reaching the throat and airways. These warrant prompt evaluation.
Reducing Reflux at Its Source
Because heartburn comes down to acid reaching tissue that can’t handle it, the most effective strategies either reduce that acid, strengthen the barrier, or lower the pressure pushing against it. Losing even a modest amount of abdominal weight can measurably reduce reflux episodes. Eating smaller meals and finishing dinner at least two to three hours before lying down gives your stomach time to empty. Avoiding your personal trigger foods, which vary from person to person, removes the chemical signals that relax the sphincter.
Over-the-counter antacids neutralize acid that’s already in the esophagus, giving quick but temporary relief. Acid-reducing medications work by lowering the amount of acid your stomach produces in the first place, which means that even if reflux still occurs, the fluid that reaches the esophagus is less damaging. These are effective for many people but aren’t designed for indefinite use without medical guidance, since your stomach acid exists for a reason: it kills bacteria, breaks down protein, and helps you absorb key nutrients like calcium and iron.
For people with a hiatal hernia or a severely weakened sphincter, structural changes to the anatomy may be the only way to restore a reliable barrier. But for the majority of people who get heartburn, the cause is a combination of sphincter relaxation, pressure, and timing, all of which respond to changes you can make on your own.

