Why Do I Have Heartburn? Causes and What Helps

Heartburn happens when stomach acid flows backward into your esophagus, the tube connecting your mouth to your stomach. At the bottom of that tube sits a ring of muscle called the lower esophageal sphincter, which normally opens to let food pass into your stomach and then closes tight. When that muscle relaxes at the wrong time, or when pressure in your abdomen pushes acid upward, you get that familiar burning sensation behind your breastbone. The reasons this happens range from what you ate an hour ago to medications you take daily.

How Certain Foods Trigger It

Several common foods and drinks directly relax the muscle at the bottom of your esophagus, giving acid an easy path upward. Coffee relaxes that muscle whether it’s caffeinated or decaf, so switching to decaf won’t necessarily help. Chocolate contains a compound from the cocoa plant that works similarly to caffeine on that same muscle. Peppermint, garlic, and onions have the same relaxing effect.

Fatty, spicy, and fried foods are a double problem. They relax the esophageal muscle and slow down how quickly your stomach empties, which means more acid sits in your stomach for longer. Large meals compound this by stretching the stomach and increasing the pressure pushing against that already-weakened barrier. If your heartburn tends to follow meals, the simplest explanation is often the right one: something you ate loosened the gate.

Extra Weight and Abdominal Pressure

Carrying extra weight around your midsection increases the pressure inside your abdomen. That added pressure pushes against your stomach and displaces the esophageal sphincter, making it harder for the muscle to stay closed. This is why heartburn often gets worse with weight gain and improves with weight loss. Even tight clothing or a heavy belt can temporarily increase abdominal pressure enough to trigger a reflux episode in some people.

Pregnancy and Hormonal Changes

Up to 80% of pregnant people experience heartburn at some point during pregnancy, and there’s a clear biological reason. Rising levels of progesterone and estrogen progressively relax the lower esophageal sphincter throughout pregnancy. Research measuring sphincter pressure at 12, 24, and 36 weeks of gestation found that it dropped steadily, reaching its lowest point in the final trimester. On top of the hormonal effect, the growing uterus pushes the stomach upward and increases abdominal pressure. The combination makes heartburn in late pregnancy almost unavoidable for many people, though it typically resolves within weeks of delivery.

A Hiatal Hernia

A hiatal hernia occurs when the upper part of your stomach pushes through the opening in your diaphragm where the esophagus passes through. This displaces the junction between your esophagus and stomach, pulling it above the diaphragm. When that junction is out of position, the muscles that normally tighten to prevent reflux can’t contract effectively. The hernia also traps a pocket of acid at the top of the stomach that can’t drain away normally. Many small hiatal hernias cause no symptoms at all, but larger ones can produce persistent, hard-to-control heartburn.

Medications That Make It Worse

Some medications irritate the esophagus directly, causing a burning pain that feels identical to acid reflux. Common culprits include certain antibiotics, iron supplements, potassium supplements, and bone-density medications taken by mouth. These can cause damage if they dissolve against the esophageal lining, which is why many come with instructions to take them with a full glass of water and stay upright afterward.

A separate group of medications actually increases acid reflux by relaxing the esophageal sphincter or slowing digestion. Pain relievers like ibuprofen and aspirin fall into this category, along with blood pressure medications (particularly calcium channel blockers), opioid painkillers, sedatives, certain antidepressants, and progesterone. If your heartburn started or worsened around the same time you began a new medication, that connection is worth exploring with whoever prescribed it.

Slow Stomach Emptying

Your stomach is designed to process food and move it into the small intestine within a few hours. When that process slows down, food and acid linger in the stomach longer than they should, increasing the number of reflux episodes. This can happen temporarily after a large, fatty meal. In some people, the nerve that controls the stomach’s muscles becomes damaged (often from diabetes or surgery), causing a chronic condition called gastroparesis. Heartburn is one of its hallmark symptoms, alongside nausea, bloating, and feeling full after just a few bites.

Why It Gets Worse at Night

If your heartburn flares up when you lie down, gravity is the main reason. When you’re upright, gravity helps keep stomach contents where they belong. The moment you recline, that advantage disappears, and acid can pool against the esophageal sphincter and slip through. Eating within two hours of bedtime makes this significantly worse because your stomach is still actively producing acid to digest the meal.

Elevating the head of your bed by 6 to 8 inches using blocks or a wedge under the mattress helps restore some of gravity’s protective effect. Propping yourself up with pillows doesn’t work as well because it bends your body at the waist, which can actually increase abdominal pressure. Sleeping on your left side also helps, since the stomach’s natural curve positions acid away from the sphincter in that position.

Heartburn or Something More Serious

Heartburn produces a burning sensation in the chest, often after eating or while lying down. It may come with a sour taste in your mouth or a small amount of stomach contents rising into the back of your throat. Antacids typically bring relief within minutes.

A heart attack can feel remarkably similar. Even experienced doctors can’t always tell the difference based on symptoms alone. Heart attack pain tends to involve pressure, tightness, or squeezing in the chest that may spread to the neck, jaw, or arms. It often comes with shortness of breath, cold sweat, lightheadedness, or sudden fatigue. Women are more likely than men to experience jaw pain, back pain, nausea, or shortness of breath rather than the classic crushing chest pain. Both heartburn and heart attack symptoms can come and go, so the fact that pain subsides doesn’t rule out a cardiac event. Persistent or unexplained chest pain warrants a call to emergency services.

What Typically Helps

For occasional heartburn, the fix is often straightforward: eat smaller meals, avoid your personal trigger foods, wait at least two to three hours after eating before lying down, and elevate the head of your bed if nighttime symptoms are a problem. Losing even a modest amount of weight can reduce abdominal pressure enough to make a noticeable difference.

Over-the-counter antacids neutralize acid that’s already in the esophagus and work within minutes. Acid reducers take longer to kick in but suppress acid production for hours, making them better for preventing symptoms you know are coming. If you’re reaching for these medications more than twice a week, or if your heartburn has persisted for several weeks despite lifestyle changes, that pattern points toward GERD (gastroesophageal reflux disease), a chronic form of reflux that may need a longer-term management plan.