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 weakens over time, acid escapes upward and causes the burning sensation behind your breastbone. What triggers that malfunction ranges from the meal you just ate to medications you take daily.
How the Valve Between Your Stomach and Esophagus Fails
Your lower esophageal sphincter maintains a resting pressure of about 15 to 30 mmHg, enough to seal off the stomach between swallows. But your body has a built-in override: when your stomach stretches with food or gas, a nerve reflex causes the sphincter to relax for 10 to 45 seconds to release that pressure. This is normal and happens to everyone. The problem starts when these relaxation episodes become too frequent, last too long, or happen when acid is sitting right at the top of your stomach.
Certain substances directly lower the sphincter’s resting pressure. Fat, chocolate, alcohol, and nicotine all reduce the muscle’s ability to stay closed. When the baseline pressure drops low enough, acid can leak through even without a full relaxation episode.
Foods That Trigger Heartburn
Fatty and fried foods are the most consistently reported trigger. They slow stomach emptying, which means food and acid sit in your stomach longer. The longer your stomach stays full and distended, the more frequently that sphincter reflex fires, giving acid repeated opportunities to escape. This is why a greasy meal can cause heartburn that lingers for hours.
Chocolate contains a compound called methylxanthine, chemically similar to caffeine, that directly relaxes the sphincter muscle. Peppermint, garlic, and onions do the same thing through different pathways. Coffee and other caffeinated drinks can also lower sphincter pressure, though sensitivity varies from person to person.
Spicy foods work differently. Capsaicin, the compound that makes peppers hot, interacts with sensory nerves in the esophageal lining. In a healthy esophagus, capsaicin actually stimulates protective responses. But if your esophagus is already irritated from repeated acid exposure, spicy food amplifies the burning sensation rather than causing new reflux.
Acidic foods like tomatoes, citrus fruits, and vinegar-based dressings don’t necessarily increase the amount of acid that refluxes, but they lower the pH of whatever does come up, making the contact more painful. Carbonated drinks stretch the stomach with gas, triggering more sphincter relaxation episodes.
Alcohol and Nicotine
Alcohol weakens the sphincter and stimulates acid production at the same time, a combination that makes reflux both more likely and more damaging. Wine and beer tend to be worse than spirits because of their higher volume and acidity, but any alcohol can contribute.
Smoking reduces sphincter pressure by 19 to 42 percent. Nicotine itself is responsible: studies using nicotine patches (removing smoke from the equation entirely) found a 27 to 31 percent drop in sphincter pressure. If you use nicotine in any form, patches, gum, or vaping, you’re weakening that valve.
Body Weight and Pregnancy
Carrying extra weight around your midsection increases pressure inside your abdomen, which pushes against your stomach and forces its contents upward. This elevated pressure also displaces the sphincter from its normal position, reducing its ability to seal properly. The relationship is mechanical and dose-dependent: the more abdominal weight, the greater the pressure gradient pushing acid toward your esophagus.
Pregnancy causes heartburn through the same mechanism. A growing uterus compresses the stomach from below, and hormonal changes during pregnancy further relax the sphincter muscle. Up to 80 percent of pregnant women experience heartburn, particularly in the third trimester when abdominal pressure peaks.
Medications That Cause or Worsen Heartburn
Some common medications irritate the esophagus directly as they pass through. Ibuprofen, aspirin, and other over-the-counter pain relievers fall into this category, as do bisphosphonates (drugs commonly prescribed for osteoporosis like alendronate and risedronate). If you’ve ever swallowed one of these pills without enough water or right before lying down, you may have felt the result.
Other medications worsen reflux by relaxing the sphincter. Blood pressure drugs, including calcium channel blockers, ACE inhibitors, and nitrates, can lower sphincter tone as a side effect. Statins prescribed for cholesterol do the same. If your heartburn started or worsened after beginning a new medication, that connection is worth raising with your prescriber.
Hiatal Hernia
A hiatal hernia occurs when the upper part of your stomach pushes through the diaphragm, the muscular wall that separates your chest from your abdomen. Normally, the diaphragm reinforces the sphincter by squeezing around it. When a hernia develops, these two structures separate, and both become less effective. The hernia also creates a small pouch above the diaphragm that traps acid, acting as a reservoir that can reflux into the esophagus during swallowing. People with obesity and pregnant women are most susceptible to developing hiatal hernias, and straining, heavy lifting, persistent coughing, or vomiting can trigger one.
Eating Habits and Timing
What you eat matters, but so does when and how much. Large meals distend the stomach more, triggering more sphincter relaxation episodes. Eating within two to three hours of lying down is one of the most reliable heartburn triggers because gravity is no longer helping keep acid in your stomach.
Tight clothing around the waist, bending over after eating, and vigorous exercise on a full stomach all increase abdominal pressure and push acid upward. Even something as simple as slouching after a meal can compress the stomach enough to provoke reflux in someone who’s prone to it.
Why Nighttime Heartburn Feels Worse
Lying flat eliminates the gravitational advantage that keeps acid in your stomach during the day. When you lie on your right side, your esophagus sits below the level where your stomach connects to it, essentially positioning acid to flow downhill into your throat. Sleeping on your left side flips this arrangement, placing the esophagus above the stomach and reducing both the frequency and duration of acid exposure. A systematic review of the evidence confirmed that left-side sleeping significantly improves reflux symptoms. Elevating the head of your bed by six inches achieves a similar effect.
Finding Your Personal Triggers
The foods and habits listed above are the most common culprits, but heartburn triggers are surprisingly individual. Some people eat tomato sauce without issue but can’t tolerate coffee. Others handle spicy food fine but get reflux from chocolate. Keeping a simple food diary for two to three weeks, noting what you ate, when you ate it, and whether symptoms followed, is the most reliable way to identify your specific pattern.
Pay attention to combinations, not just individual foods. A slice of pizza might be fine at lunch but cause problems at 9 p.m. A glass of wine with dinner may only trigger heartburn when paired with a rich dessert. The total load on your sphincter, fat plus alcohol plus a full stomach plus lying down, often matters more than any single item on its own.
When Occasional Heartburn Becomes GERD
Most people experience heartburn occasionally, and it resolves on its own or with an antacid. Gastroesophageal reflux disease, or GERD, is diagnosed when reflux causes visible damage to the esophageal lining or when acid exposure is objectively elevated on monitoring tests. Updated 2025 guidelines emphasize that symptoms alone aren’t enough for a definitive diagnosis. Doctors look for mucosal breaks in the esophagus on endoscopy or abnormal acid levels measured by a probe worn for 24 hours.
If you’re reaching for antacids more than twice a week, waking up with acid in your throat, or noticing that heartburn is affecting what you eat and how you sleep, those are signs that occasional reflux has crossed into something more persistent. Untreated, chronic acid exposure can change the cells lining the esophagus, a condition called Barrett’s esophagus, which impairs the esophagus’s normal sensory and motor function over time.