How to Prevent or Treat Heartburn

Jan 25, 2023


Alto Pharmacy

Many of us are familiar with heartburn, a burning sensation in the throat frequently triggered by what we eat. While occasional heartburn can often be prevented or managed with lifestyle adjustments and over-the-counter medications, more frequent or severe cases may indicate an underlying condition that requires additional treatment.

Here’s what to know about the causes and triggers of heartburn and treatment options.

What causes heartburn?

The burning sensation that characterizes heartburn is caused by reflux, an issue with the digestive process. Normally, a valve at the bottom of your esophagus called the esophageal sphincter allows food to enter your stomach, where acids help digest what you’ve eaten.

Reflux occurs when the esophageal sphincter doesn’t close as it should, allowing acid to pass from the stomach into the esophagus. While your stomach is equipped to handle this acidic mixture, your esophagus is more sensitive, and reflux results in the discomfort of heartburn.

There are several potential causes of heartburn, including the following:

  • Gastroesophageal reflux disease (GERD): Severe, recurring heartburn may be a sign of gastroesophageal reflux disease (GERD), or chronic acid reflux.

  • Pregnancy: Hormonal changes and the pressure of your growing baby during pregnancy may affect esophageal function.

  • Eating habits: Dietary choices, the size of your meals, and eating close to bedtime frequently factor into heartburn.

  • Lifestyle habits: Acid reflux has also been linked to smoking and high levels of stress.

  • Medications: Certain medications — including over-the-counter pain relief medications such as ibuprofen (Advil®, Motrin®) and aspirin; tricyclic antidepressants; and some blood pressure and heart medications — are known to irritate the esophagus, resulting in heartburn or increasing the severity of GERD.

Food and drinks that are known to trigger heartburn include:

  • Onions

  • Citrus fruits like oranges, limes, and lemons

  • Tomatoes and tomato-based products

  • Citrus juices

  • Chocolate

  • Alcohol

  • Caffeinated and carbonated beverages

Lifestyle and habit adjustments

Many people are able to manage mild or occasional heartburn with small changes to their routine or habits. Here are some steps to take as a starting point.

Avoid eating before bedtime

Many health experts suggest eating at least three to four hours before going to bed so that your stomach has time to empty.

Eat smaller meals

Eating smaller portions or having multiple smaller meals throughout the day rather than a few larger ones may help prevent heartburn.

Be mindful of what you eat

In addition to avoiding triggers like onions, tomatoes, and spicy or acidic foods, eating certain foods may help you manage heartburn discomfort. Oatmeal and whole grains can absorb and reduce acid. Replacing full-fat dairy products with low-fat ones is often another effective preventative measure.

Wear comfortable clothing

Some people find that belts and tight clothing can trigger their acid reflux.

Practice good posture

Slouching may put additional pressure on your abdomen, which can in turn cause acid to enter the esophagus. Try to sit straight and maintain an upright position.

Choose the best sleep position

If you frequently experience heartburn, lying flat on your back likely isn’t the best sleep position. For relief, elevate your upper body as much as possible with a wedge pillow or by adjusting the settings on your bed, if possible.

Over-the-counter medications for heartburn

Along with the above changes to lifestyle habits, over-the-counter (OTC) medications can help manage mild cases of heartburn. Three types of OTCs are frequently used to treat heartburn: antacids, acid blockers, and proton pump inhibitors.


OTC antacids including Tums®, Rolaids®, Maalox®, and Gaviscon® relieve heartburn by reducing the amount of acid in your stomach.

In some cases, these medications may cause side effects such as constipation, diarrhea, or stomach cramps. They aren’t recommended for those with symptoms of appendicitis or bowel inflammation. Consult with your doctor in advance about the best way to take these medications.

Acid blockers

OTC acid blockers including Pepcid AC® and Tagamet HB® block production of stomach acid to relieve heartburn and other digestive issues.

Your provider may advise you to take antacids when you first begin to take an acid blocker. Antacids are faster-acting and can help relieve heartburn discomfort while acid blocker effects begin. Always follow your doctor’s directions. In most cases, an antacid is taken an hour before or an hour after taking an acid blocker. 

Stronger acid blockers are available by prescription only.

Proton pump inhibitors

Proton pump inhibitors such as Prilosec® also block production of stomach acid.

Purchase pharmacy essentials like Tums and Prilosec through the Alto Essentials store in our mobile app!

Prescription medications for heartburn

If OTC medications don’t ease your heartburn, your provider may prescribe you a medication. There are two main classes of prescription medications for heartburn.

Prescription-strength acid blockers including Pepcid, Tagamet, and Zantac® offer a higher dose than their OTC counterparts to relieve more severe heartburn and treat GERD.

Prescription-strength proton pump inhibitors including Aciphex®, Nexium®, Prevacid®, Prilosec, and Protonix® are highly effective at blocking production of stomach acid.

When should I speak to a doctor about heartburn?

It typically isn’t advised to use any OTC heartburn medication for longer than two weeks without speaking to your doctor.

You should also speak to your doctor about your heartburn if your stool is darker than usual or you’re experiencing vomiting in addition to other symptoms.

How Alto can ease your heartburn

Some heartburn medications including Tums and Prilosec are available for purchase in the Essentials Store in the Alto app. You can also add these products to your order when scheduling your medication delivery.

If your treatment plan includes a prescription medication, we’ll make it as simple as possible to manage, with fast and reliable delivery and support with insurance and savings opportunities.

You can reach out with any questions directly through in-app messaging.

This content is not intended to be a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or another qualified health provider with any questions you may have regarding a medical condition.

All third party trademarks (including logos and icons) referenced by Alto Pharmacy remain the property of their respective owners. Unless specifically identified as such, Alto’s use of third party trademarks does not indicate any relationship, sponsorship or endorsement between Alto and the owners of these trademarks.