Why Do I Get Heartburn? Common Causes Explained

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, called the lower esophageal sphincter, normally stays closed to keep acid where it belongs. When that muscle relaxes at the wrong time or doesn’t close tightly enough, acid washes upward and irritates the sensitive lining of the esophagus, producing that familiar burning sensation behind your breastbone.

How the Valve Fails

Your lower esophageal sphincter relaxes every time you swallow to let food pass into your stomach, then squeezes shut again. But it also relaxes on its own, without any swallowing involved. These spontaneous relaxations are triggered by your stomach stretching, typically after a meal. Stretch receptors in the upper stomach send signals through the vagus nerve to your brainstem, which sends signals back down telling the sphincter to open. In small doses, this is normal and lets trapped gas escape (that’s a burp). In people with frequent heartburn, these relaxations happen more often or last longer, giving acid repeated opportunities to splash upward.

A hiatal hernia makes things worse. This occurs when the upper part of your stomach pushes up through the diaphragm into your chest cavity. When the stomach sits partly above the diaphragm, the natural pinch point that helps keep acid down is compromised. People with a hiatal hernia are more likely to experience reflux not only from spontaneous sphincter relaxations but also from straining, bending over, or even normal swallowing.

Foods and Drinks That Trigger It

Certain foods directly weaken the sphincter muscle, making reflux more likely. Coffee, both regular and decaf, relaxes the sphincter. So does chocolate, which contains a compound called methylxanthine (chemically similar to caffeine) that loosens the muscle. Peppermint, garlic, and onions have the same relaxing effect.

Other foods don’t weaken the sphincter but irritate the esophagus on contact. Citrus fruits, tomato-based sauces, and spicy foods fall into this category. Carbonated drinks can increase stomach distension, which triggers more of those spontaneous sphincter relaxations. Alcohol does both: it relaxes the sphincter and irritates the lining.

Fatty meals are a particularly common trigger because fat slows stomach emptying. The longer food sits in your stomach, the more distended it stays, and the more signals your stretch receptors send to relax the sphincter. Large meals of any kind have a similar effect simply by volume.

Timing, Posture, and Body Weight

Gravity plays a bigger role than most people realize. When you’re upright, acid has to travel uphill to reach your esophagus. Lie down within a couple of hours of eating, and you remove that advantage entirely. This is why heartburn often strikes at night or after a nap on a full stomach.

Your sleeping position matters too. A study using simultaneous sleep tracking and esophageal monitoring found that sleeping on your left side produced significantly less acid exposure than sleeping on your right side or on your back. When you lie on your right side, your stomach sits above your esophagus, making it easier for acid to spill over. On the left side, the junction between the stomach and esophagus sits above the pool of acid. Acid clearance time (how quickly the esophagus clears acid after an episode) was about 35 seconds on the left side, compared to 90 seconds on the right and 76 seconds on the back.

Excess body weight increases abdominal pressure, which pushes stomach contents upward. Even modest weight gain around the midsection can increase heartburn frequency, and losing weight is one of the most effective long-term strategies for reducing episodes. Tight clothing around the waist, pregnancy, and frequent heavy lifting create similar upward pressure.

Medications That Make It Worse

Several common medications contribute to heartburn in two different ways. Some irritate the esophagus directly, including over-the-counter pain relievers like ibuprofen and aspirin. If you take these on an empty stomach or right before lying down, the risk increases.

Other medications relax the sphincter muscle itself. Blood pressure drugs like calcium channel blockers, ACE inhibitors, and nitrates all have this effect. Statins used for cholesterol can also worsen reflux. If you started a new medication around the time your heartburn became more frequent, that connection is worth exploring with whoever prescribed it.

Stress and a Sensitive Esophagus

Some people experience persistent heartburn even when tests show normal acid levels. This happens because the problem isn’t always about how much acid is present. It can also be about how sensitive your esophagus is to stimulation of any kind.

The nerves lining your esophagus can become hypersensitive through two pathways. Locally, even low-grade inflammation that doesn’t cause visible damage can alter how nerve endings respond, making normal sensations register as painful. This is similar to how sunburned skin hurts from a light touch that wouldn’t normally bother you. Centrally, your brain can amplify signals from the esophagus. Stress, anxiety, and sleep deprivation all dial up this amplification. One longitudinal study found that severe, sustained life stress predicted increased heartburn symptoms over time, independent of actual acid exposure. Even mechanical stimuli like small amounts of gas in the esophagus can trigger burning sensations in people with this heightened sensitivity.

This means that for some people, managing heartburn isn’t only about reducing acid. Addressing stress, improving sleep, and working on the psychological component can make a real difference.

What Helps

For occasional heartburn, over-the-counter antacids neutralize acid that’s already in the esophagus and provide fast but short-lived relief. H2 blockers (like famotidine) reduce acid production for several hours and work well when taken before a meal you expect to be triggering. Proton pump inhibitors are the strongest acid suppressors available without a prescription and are intended for more frequent symptoms, typically taken daily for a set period rather than as needed.

Lifestyle changes often work as well as medication for mild to moderate heartburn. The most effective ones target the mechanics of reflux directly: eating smaller meals, staying upright for two to three hours after eating, sleeping on your left side, elevating the head of your bed by six inches (extra pillows don’t work as well because they bend your neck without changing the angle of your esophagus), losing weight if you carry extra around the middle, and identifying your personal food triggers rather than eliminating everything on a generic list.

When Heartburn Becomes Chronic

Occasional heartburn after a large or spicy meal is extremely common and not a sign of damage. But when it happens more than twice a week for several weeks, it may indicate gastroesophageal reflux disease (GERD), which means the reflux is frequent enough to potentially cause problems.

Repeated acid exposure can inflame and erode the esophageal lining. Over years, the cells lining the lower esophagus can change in response to chronic acid exposure, a condition called Barrett’s esophagus. Between 10% and 15% of people with GERD develop Barrett’s. The condition itself usually causes no additional symptoms, but it carries a small risk of progressing to esophageal cancer: about half a percent per year. This is why persistent heartburn that doesn’t respond to lifestyle changes or over-the-counter treatment warrants further evaluation, particularly if you also have difficulty swallowing, unintentional weight loss, or a sensation of food getting stuck.