Heartburn is a burning sensation in your chest caused by stomach acid flowing backward into your esophagus, the tube that carries food from your mouth to your stomach. Despite the name, it has nothing to do with your heart. The sensation comes from acid irritating the esophageal lining, which lacks the thick protective coating your stomach has. It’s one of the most common digestive complaints, and understanding the mechanics behind it helps explain why certain foods, positions, and habits make it worse.
What Happens Inside Your Body
At the base of your esophagus sits a ring of muscle called the lower esophageal sphincter (LES). It works like a one-way valve: it opens to let food drop into your stomach, then closes to keep everything down. Just above the stomach, a second structure called the flap valve adds another layer of protection. When both are working properly, stomach acid stays where it belongs.
Heartburn happens when these barriers fail. There are two main ways the LES malfunctions. The first is inappropriate relaxation, where the valve opens at random moments when it shouldn’t. The second is chronically weak pressure, where the muscle simply doesn’t squeeze tightly enough to form a seal. Both patterns appear to stem primarily from faulty nerve signaling to the muscle rather than a problem with the muscle tissue itself.
Your diaphragm also plays a supporting role. This large breathing muscle wraps around the esophagus and reinforces the LES from the outside. Aging, excess abdominal pressure (from obesity or pregnancy), and stress can weaken the diaphragm, reducing that reinforcement. A hiatal hernia, where part of the stomach pushes up through the diaphragm into the chest cavity, disrupts the alignment of the entire anti-reflux barrier and makes reflux significantly more likely.
Why It Burns
Your stomach produces hydrochloric acid with a pH as low as 1 to 1.5, strong enough to break down food. The stomach lining is built to handle this. Your esophagus is not. When acid washes upward, it contacts tissue that has no defense against that level of acidity.
Research published in Gastroenterology measured how quickly the esophagus registers pain at different acid levels. At pH 1 and 1.5, every single test subject experienced pain, and it came on fast. At pH 2, 80% of subjects felt it. Even at milder acid levels (pH 2.5 to 6), half still reported pain, though it took longer to develop. The more acidic the exposure, the faster and more intense the burn.
What Heartburn Feels Like
The classic symptom is a burning sensation behind your breastbone that can extend into the upper abdomen. It typically shows up after eating, or when you lie down or bend over. You may notice a sour or bitter taste in your mouth, especially at night, from small amounts of stomach contents creeping into the back of your throat. Antacids usually bring quick relief, which is one of the simplest ways to confirm the sensation is heartburn rather than something else.
Nighttime heartburn tends to be worse for a straightforward reason: gravity. When you’re upright, gravity helps keep acid in your stomach. When you lie flat, acid can pool against the LES and slip through more easily. Eating within two hours of bed makes this worse because your stomach is still actively producing acid to digest the meal.
Heartburn vs. Heart Attack
Heartburn and heart attacks can feel remarkably similar. Even experienced doctors sometimes can’t distinguish between the two based on symptoms alone. That said, there are patterns worth knowing.
Heartburn tends to burn, responds to antacids, and gets worse when you lie down or bend over. Heart-related chest pain more often feels like pressure, tightness, or squeezing, and it may radiate to your neck, jaw, or arms. Heart attacks also bring symptoms heartburn doesn’t: shortness of breath, cold sweats, lightheadedness, and unusual fatigue. If you’re unsure, especially if the pain is new, severe, or accompanied by those additional symptoms, treat it as a cardiac emergency.
Occasional Heartburn vs. GERD
Most people experience heartburn now and then, often after a large meal, spicy food, or too much coffee. That’s normal and not a medical condition. Gastroesophageal reflux disease (GERD) is the diagnosis when acid reflux becomes chronic, defined as causing symptoms two or more times per week. GERD can also be diagnosed when reflux has caused visible damage to esophageal tissue, regardless of how often symptoms occur.
The distinction matters because chronic acid exposure changes the esophagus over time. Long-term inflammation can lead to a condition called Barrett’s esophagus, where the esophageal lining transforms into tissue that resembles the intestinal lining. Barrett’s esophagus carries a small but real cancer risk. For people with Barrett’s but no precancerous cell changes, the annual risk of developing esophageal cancer is roughly 0.1% to 0.3%. With low-grade precancerous changes, that rises to about 0.5% per year. With high-grade changes, it jumps to 7%. These numbers are low in absolute terms, but they illustrate why persistent, frequent heartburn is worth addressing rather than ignoring for years.
Common Triggers
Certain foods relax the LES or increase acid production, making reflux more likely. The usual culprits include citrus, tomatoes, chocolate, mint, garlic, onions, fatty or fried foods, alcohol, and caffeinated drinks. Carbonated beverages can also contribute by increasing pressure inside the stomach.
Beyond diet, several physical factors play a role. Eating large meals stretches the stomach and puts pressure on the LES. Tight clothing around the waist does the same. Smoking weakens the sphincter directly. Excess body weight, particularly around the midsection, increases abdominal pressure and pushes the stomach upward. Lying down or bending over shortly after eating removes gravity from the equation at the worst possible time.
How the Three Types of Treatment Work
Over-the-counter heartburn treatments fall into three categories, each working differently and on a different timeline.
- Antacids neutralize acid that’s already in your stomach. They work the fastest of the three options, providing relief within minutes, but the effect is short-lived. They’re best for occasional, mild episodes.
- H2 blockers block one of the chemical signals that tells your stomach to produce acid. They take about an hour to kick in, but relief lasts four to ten hours. They’re a better option when you anticipate heartburn, such as before a meal you know will be a trigger.
- Proton pump inhibitors (PPIs) suppress acid production more aggressively and for a longer duration. The tradeoff is speed: it can take one to four days to feel the full effect. PPIs are designed for frequent heartburn rather than the occasional episode.
Simple Changes That Reduce Symptoms
For many people, lifestyle adjustments make a noticeable difference without medication. Eating smaller meals reduces stomach pressure. Waiting at least two to three hours after eating before lying down gives your stomach time to empty. Elevating the head of your bed by about six inches (using a wedge or blocks under the bedposts, not just extra pillows) helps gravity keep acid down while you sleep.
Losing weight, if you carry extra weight around the middle, is one of the most effective long-term strategies. Even modest weight loss can reduce the frequency and severity of episodes. Avoiding your personal trigger foods matters more than following a generic list, since triggers vary from person to person. Keeping a simple log of what you ate before an episode can help you identify yours.

