How to Prevent Heartburn
One way to prevent heartburn is by avoiding foods that trigger it. Start by limiting your intake of dairy products like milk, cottage cheese, and sour cream. Acidic fruits such as oranges, lemons, cranberries, and tomatoes can cause heart burn, as well as meat products like ground beef, pork, chicken nuggets, and buffalo wings. Try avoid spicy and high-fat foods, and limit your intake of carbonated beverages, alcohol, and caffeinated drinks.
Eat fewer foods that are highly acidic. When you eat too many acidic foods, the acid in your stomach can splash up into your esophagus, causing a burning pain. While you do not have to cut highly acidic foods out of your diet entirely, you should try to limit your intake of them. Common examples include: Dairy products: milk, cottage cheese, milkshakes, and sour cream. Fruits: oranges, lemons, cranberries, grapefruits, and tomatoes. Meat products: ground beef, ground pork, and fried chicken. Steer clear of spicy foods. Many spicy foods, and especially those that include peppers, contain capsaicin, which can trigger heartburn. Because of this, keep the amount of spicy foods you eat to a minimum. Cut back on your consumption of peppers, chili, and hot sauce, for instance. Reduce your intake of foods that are rich in fat. Fat can be very challenging for your stomach to digest. Because of this, your stomach is forced to produce more acid in order to break fatty foods down. In addition to this, fatty foods can occupy a larger space in your stomach, which in turn can force the acid into your stomach up and into your esophagus. Examples of fatty foods include beef, pork, butter, tallow, suet, lard, cheese, nuts and seeds, chocolate, processed meats, fried snacks and food, and high-fat dairy products like ice cream. Drink fewer carbonated beverages. When you drink carbonated beverages like soda, you swallow both water and air. These air bubbles reach your stomach, burst, and expand. This causes an increased pressure in your stomach that can trigger heartburn. In addition to this increased pressure, many carbonated drinks, including nearly all soft drinks, are acidic. While the carbonation can cause belching, which may provide some very temporary relief from heartburn, you're usually better off avoiding carbonated beverages in the first place. Drink less alcohol. Alcohol tends to relax the esophageal sphincter, which is the valve that separates your stomach from your esophagus. Therefore, when you drink alcoholic beverages, the acid in your stomach is more likely to travel up into your esophagus and cause heartburn. In particular, avoid drinking alcohol when you consume acidic, spicy, fatty, or other heartburn-causing types of food. Limit how many caffeinated beverages you drink. Like alcohol, caffeine can relax your esophageal sphincter, which in turn makes it more likely that stomach acid will push up into your throat. Beverages that often contain caffeine include: Coffee Black tea Soda Energy drinks Eat small, frequent meals. When you eat a large meal, you put more pressure on your stomach, which causes it to produce more acid. The more acid that's produced, the more likely it is to push into your esophagus. To avoid this, eat smaller, more frequent meals throughout the day, rather than 3 large meals. Eating small meals throughout the day can keep your stomach working efficiently, without the production of excess acid. Make sure you cut back on the amount you eat at each meal, so that you don't eat more overall during your 5 smaller meals than you did with your 3 larger meals. Eat foods that reduce your risk of heartburn. This includes low cholesterol protein options, like chicken, fish, beans, lentils, and almonds. Additionally, most grains, vegetables and fruits reduce your likelihood of heartburn, especially green veggies. For example, you might eat oatmeal with chopped banana for breakfast, a green salad with tuna for lunch, and chicken with steamed veggies and a baked sweet potato for dinner. Green veggies are your best choice. Eat lots of broccoli, kale, spinach, Brussels sprouts, and asparagus. For fruit, great choices include berries, melon, apples, pears, peaches, bananas, and avocado. Walk, stand, or sit for 30 to 45 minutes after eating. Standing or sitting upright means gravity helps push your food and stomach acid downward. Even better, a bit of light exercise (like easy walking) after a meal can help your body digest food more efficiently. Don't engage in vigorous exercise like running, biking, swimming, aerobics, or playing basketball for at least 1-2 hours after eating a meal, however. Doing so might churn up stomach acid and exacerbate your heartburn. Lying on your back after a meal increases the risk of stomach acid flowing upward into your esophagus, which results in heartburn. Staying upright helps your avoid this. Don’t eat anything (especially trigger foods) for 2-3 hours before bedtime. Lying down puts your stomach at almost the same level as your esophagus. When you eat too much, or if the food your do eat is too rich, the food may press down on your esophageal sphincter and let stomach acid pass through it. If you must lie down within 2-3 hours after eating, prop yourself up so that your upper body is at a 45 to 90 degree angle with the lower half of your body. Use pillows or bed lifts so you sleep on an incline. If you tend to get nighttime heartburn even if you don't eat for several hours before bedtime, try making gravity your ally. Either buy a foam wedge that angles the upper half of your body, or place pieces of wood under the legs at the head of your bed to put it on an incline. Buy a foam wedge at a medical supply store or bedding retailer. Try raising the head of your bed about 2–3 in (5.1–7.6 cm) with wood blocks. Quit smoking if you’re a smoker. Stopping smoking can help you prevent heartburn, while also making your healthier in general. The ways that cigarettes increase your chances of getting heartburn include: Cigarette smoking decreases your production of saliva. Saliva acts as a neutralizing defense against the acidity of your stomach, but if you do not have any saliva, it cannot protect you. Cigarette smoking increases the production of acid in the stomach. Cigarette smoking has a relaxing effect on the esophageal sphincter. Cigarette smokers have slower gastric motility. This leads to an inefficient emptying of the stomach. Lose weight if you are overweight. Being overweight can increase the pressure placed on your stomach. This squeezing action decreases the space within the stomach, and may force some gastric content to move back up into your esophagus. In order to lose weight the right way, you will have to create and stick to a healthy eating plan. You should also try to exercise regularly. Visit your doctor to determine if you need to lose weight, find out what your weight goal should be, and discuss the best ways for you to achieve this goal. Avoid tight clothes and belts that constrict your waist. Anything that puts pressure on your stomach can act as a catalyst for heartburn. Instead, choose loose-fitting clothes and don't wear a belt when possible. Clothes that can lead to heartburn include: Slenderizing undergarments. Tight-fitting belts. Tight pants. Do diaphragmatic breathing to reduce GERD symptoms. Lie down on your bed with 1 hand over your stomach and 1 hand over your chest. Breathe slowly through your nose to a count of 4, pulling the air into your stomach. Count to 4 as you exhale, imagining your stomach deflating. Repeat until you've taken 30 breaths. Your breathing practice will take about 5 minutes. Once you get used to breathing in and out for 4 second counts, you can increase to an 8 second count, if you'd like. Keep a heartburn diary. When and if you do experience heartburn, write down everything you ate that day. Doing this may help you identify your particular trigger foods. This diary can also help you determine which lifestyle changes you need to make. For example, if you ate a stomach-friendly salad but were wearing slimming tights and experienced heartburn, writing this down may help you to recognize that your clothing choices may be a contributing factor. If you decide to visit your doctor because of recurring heartburn, bring the diary with you. Try an over-the-counter (OTC) H2 receptor agonist (H2RA) medication. OTC H2RAs work by reducing the production of stomach acid, which in turn makes heartburn less likely. They often work best when taken about 30 minutes before your main meal of the day, but follow the package instructions or your doctor's recommendation. OTC brand names include Pepcid, Zantac, and Tagamet. Even though these are OTC medications, they can cause serious side effects or drug interactions. Talk to the pharmacist or your doctor before using an H2RA. H2RAs are typically meant to be taken once per day for up to 14 days. Talk to your doctor if you believe you need to use the medication for a longer term. Use an OTC proton pump inhibitor (PPI) medication as another option. Like H2RAs, PPIs reduce stomach acid production, but they do so through a different process. Therefore, some people have better results with a PPI. Like H2RAs, PPIs usually work best when taken about 30 minutes before your largest daily meal. As with H2RAs, follow the package directions or your doctor's instructions. And check with your doctor or pharmacist regarding potential side effects or drug interactions before starting on a PPI. Don't use a PPI for more than 14 consecutive days without your doctor's guidance. OTC brand names include Prilosec, Protonix, and Nexium. Use antacids to relieve, but not prevent, heartburn. Antacids like milk of magnesia (magnesium hydroxide) and calcium carbonate (e.g., Tums, Rolaids) can help to reduce and neutralize stomach acid when you are experiencing heartburn. They cannot, however, help prevent heartburn from occurring in the first place. Antacids come in many brands, and in liquids, chewables, powders, and other forms. They all work in roughly the same manner, however. As with any OTC medication, you should check with your doctor or pharmacist before using antacids, especially if you take other medications or have underlying medical conditions. Talk to your doctor about prescription medications. If you have frequent heartburn (more than twice per week) or less-frequent but severe instances of heartburn, you may have gastroesophageal reflux disease (GERD). Whether you have GERD or just recurring heartburn, however, you should visit your doctor for a proper diagnosis and treatment options. Your doctor may prescribe a prescription version of a PPI or H2RA medication for daily use. Make sure you follow your doctor's instructions for taking it. They may also be able to provide advice on dietary and lifestyle changes. 
Eat fewer foods that are highly acidic. Steer clear of spicy foods. Reduce your intake of foods that are rich in fat. Drink fewer carbonated beverages. Drink less alcohol. Limit how many caffeinated beverages you drink. Eat small, frequent meals. Eat foods that reduce your risk of heartburn. Walk, stand, or sit for 30 to 45 minutes after eating. Don’t eat anything (especially trigger foods) for 2-3 hours before bedtime. Use pillows or bed lifts so you sleep on an incline. Quit smoking if you’re a smoker. Lose weight if you are overweight. Avoid tight clothes and belts that constrict your waist. Do diaphragmatic breathing to reduce GERD symptoms. Keep a heartburn diary. Try an over-the-counter (OTC) H2 receptor agonist (H2RA) medication. Use an OTC proton pump inhibitor (PPI) medication as another option. Use antacids to relieve, but not prevent, heartburn. Talk to your doctor about prescription medications. 