You can stop most heartburn episodes by changing when and what you eat, adjusting how you sleep, and using the right type of over-the-counter medication for your situation. Heartburn happens when stomach acid flows backward into your esophagus, irritating its lining. A ring of muscle at the bottom of your esophagus normally stays closed to prevent this, but certain foods, body positions, and habits cause that muscle to relax or weaken, letting acid escape upward.
Avoid the Foods That Trigger It
Certain foods cause heartburn in two ways: they relax the muscular valve between your stomach and esophagus, and they slow digestion so food sits in your stomach longer. Both create ideal conditions for acid to push upward. The most reliable triggers are foods high in fat, salt, or spice. Fried food, fast food, pizza, fatty meats like bacon and sausage, cheese, and processed snacks like potato chips top the list.
Several other foods cause the same problem through slightly different mechanisms. Tomato-based sauces and citrus fruits are highly acidic on their own. Chocolate and peppermint directly relax the esophageal valve. Carbonated beverages increase pressure inside the stomach by introducing gas. You don’t necessarily need to eliminate every one of these permanently. Try removing the most obvious offenders first and reintroducing them one at a time to figure out which ones actually bother you.
Stop Eating Three Hours Before Bed
Nighttime heartburn is especially common because lying down removes gravity’s help in keeping acid in your stomach. The Mayo Clinic recommends stopping all food at least three hours before bedtime. This gives your stomach enough time to empty most of its contents before you lie flat. Even a small late-night snack can restart acid production and fill your stomach just enough to cause problems overnight. If you tend to eat dinner late, shifting that meal earlier can make a noticeable difference within a few days.
Change Your Sleep Position
Sleeping on your left side reduces acid reflux because of simple anatomy: in that position, your stomach sits below your esophagus, making it harder for acid to travel upward. Sleeping on your right side does the opposite, positioning your stomach above the junction point and making reflux more likely.
Elevating the head of your bed also helps. The key is raising your entire upper body, not just propping your head up with pillows (which can actually bend your body in a way that increases abdominal pressure). Placing a foam wedge under your mattress or putting 6-inch blocks under the legs at the head of your bed creates a gentle slope that lets gravity work in your favor all night.
Lose Weight Around Your Midsection
Excess abdominal fat physically squeezes your stomach, increasing the pressure inside it and pushing acid upward toward your esophagus. Research using specialized pressure measurements has shown that obese patients have higher intragastric pressure, a steeper pressure difference across the esophageal valve, and more structural disruption of that valve compared to people at a healthy weight. These findings correlate specifically with waist circumference, not just overall body weight.
If you carry extra weight around your middle, even modest weight loss can reduce the mechanical force driving acid into your esophagus. You don’t need to reach an ideal BMI to see improvement. Tight clothing around the waist, including belts and high-waisted pants, can mimic the same squeezing effect, so loosening those may offer quick relief while you work on longer-term changes.
Try Ginger as a Natural Option
Ginger speeds up stomach emptying and reduces nausea by acting on specific receptors in the gut. The active compounds in ginger root help food move through your digestive system faster, which means less time for acid to build up and push into your esophagus. In a clinical trial of patients with functional dyspepsia (a condition that overlaps heavily with heartburn symptoms), 200 mg of a concentrated ginger extract taken twice daily led to significant symptom improvement. About 64% of patients taking ginger saw their symptoms resolve, compared to just 13% on placebo.
Other small studies have found similar benefits at daily doses between 1,500 and 1,650 mg of ginger powder, with improvements in reflux-like symptoms, stomach pain, and bloating. Ginger tea, fresh ginger in meals, or ginger capsules are all reasonable ways to try it. It works best as a complement to other changes, not as a standalone fix for frequent heartburn.
Choose the Right Over-the-Counter Medication
Three main types of heartburn medication are available without a prescription, and they work very differently.
- Antacids (like Tums or Rolaids) neutralize acid that’s already in your stomach. They work within minutes and are your best option for occasional heartburn that’s already happening. The relief is real but short-lived, typically lasting 30 to 60 minutes.
- H2 blockers (like famotidine) reduce the amount of acid your stomach produces. They have a quick onset and can be taken as needed, making them a good step up from antacids if you get heartburn a few times a week.
- Proton pump inhibitors, or PPIs (like omeprazole) are the strongest option. They shut down acid production more completely, but they need to be taken daily for 4 to 8 weeks to reach full effectiveness. You should take them 30 to 60 minutes before your first meal of the day for best results. Taking them only when symptoms flare won’t reliably control acid.
For the occasional pizza-induced burn, an antacid is fine. For heartburn that shows up several times a week, an H2 blocker gives you more consistent control. PPIs are meant for frequent, persistent heartburn that doesn’t respond to other approaches.
Be Cautious With Long-term PPI Use
PPIs are effective, but using them for months or years comes with trade-offs. Long-term use has been associated with reduced absorption of certain vitamins and minerals, lower bone density, and a higher risk of a specific type of gut infection. None of these risks are guaranteed, but they’re worth knowing about. If you’ve been on a PPI for more than 8 weeks, it’s reasonable to reassess whether you still need it or whether the lifestyle changes above have reduced your symptoms enough to step down to an H2 blocker or nothing at all.
Symptoms That Need Medical Attention
Most heartburn is manageable on your own, but certain symptoms signal something more serious. Difficulty swallowing, unintended weight loss, vomiting, signs of bleeding (like dark stools), anemia, or chest pain warrant a medical evaluation. The same applies if your symptoms don’t improve after 8 weeks of consistent PPI use. These situations typically call for an endoscopy to look directly at the esophagus and rule out complications like narrowing, ulcers, or precancerous changes to the tissue.

