If you've tried these approaches and had no success, talk to your provider about an over-the-counter (OTC) remedy (especially if you’re pregnant, as some OTC medicines aren’t safe in pregnancy). Antacids neutralize stomach acid. They often act immediately, but should only be used for occasional heartburn. Stomach acid blockers, such as Pepcid and Zantac, work by blocking the H2 receptor, which signals the stomach to make more acid. They can prevent acid reflux when taken about 30 minutes before meals. If these aren't enough, consider using a proton pump inhibitor, such as Prilosec, which may be effective at relieving heartburn when other treatments haven't worked.