Dr. Deepak Agrawal of the University of Texas Southwestern Medical Center said there are several medications to address heartburn, but it helps to avoid foods that cause heartburn -- cheese, grease and fat-laden foods such as pizza, chili, wings, burgers and cheese-laden nachos.
"Fats promote heartburn," Agrawal said in a statement. "For example, they relax the sphincter in the lower esophagus and make it easier for acid to reflux into the esophagus."
People who know they will be indulging could try a histamine receptor blocker -- H2 blocker -- which slows the production of stomach acid. They are generally available over the counter, Agrawal said.
"Most people suffering from heartburn get it every now and then," Agrawal said. "Those are the people who really benefit from this medication. You can take one of those pills a half hour before a meal, and you may be able to prevent the heartburn."
Proton-pump inhibitors, aimed at stopping daily heartburn, take at least several hours or even days to reach their full effect.
"So if you want to eat a pizza in the next half hour, it's not going to stop the acid that you're going to make in that time," Agrawal said.
Antacids act like a sponge to soak up the excess stomach acid, but they don't prevent the stomach from creating more acid, like H2 blockers, Agrawal said.