
If changing the way you sleep or eat doesn't work, meds are the next step. See a doctor, though, if you need a heartburn drug daily for two weeks, or several times a week for three months, or if you have a nagging cough or a sore throat, especially if you're pregnant.

If you get mild heartburn attacks occasionally and unexpectedly.
Most antacids contain ingredients that quickly neutralize acid in the esophagus and control heartburn for up to a few hours. Some antacids wear off quickly, but Mylanta Ultimate Strength Chewables is the longest-acting. To save money, try lower-cost generic versions, which are just as effective as name brands.

If you know that you're going to get heartburn in certain situations, like when you eat pizza. Take them an hour before you're about to eat a meal that's likely to trigger an attack. They all start working within 30 minutes to an hour, and one dose can last up to 12 hours, but you may have to down a pill every day at first. Pepcid Complete combines an antacid with an H-2 blocker for both immediate and longer-term relief.
They block stomach-acid production. But they aren't strong enough for chronic heartburn.

If you get heartburn more than once or twice a week. Studies have shown that PPIs like Prevacid, Prilosec, Nexium, and AcipHex work better than H-2 blockers. But they're ineffective for occasional heartburn.
They completely block the mechanism that releases stomach acid, but it can take several days for them to work. Most are dispensed by prescription only. You can buy one, Prilosec OTC, over the counter. (The generic version is omeprazole.) If you're pregnant, talk to your doctor before taking Prilosec.