If you've ever had heartburn, you know how uncomfortable it can beand how difficult it is to treat once symptoms have kicked in. Not surprisingly, experts confirm that preventing heartburn is often a lot easier than trying to deal with it, especially at night.

One way to reduce the onset of heartburn is to avoid certain foods and beverages close to bedtime, says the National Institutes of Health (NIH). Always avoid any items that have previously triggered reflux, and be especially wary of the following high-risk foods and beverages items:

  • Alcohol
  • Caffeine or carbonated beverages
  • Chocolate
  • Citrus fruits and juices
  • Tomatoes and tomato sauces
  • Spicy or fatty foods
  • Full-fat dairy products
  • Peppermint and spearmint

Eating late at night is particularly problematic because lying down with a full stomach puts pressure on your digestive system that may result in pain and discomfort. So avoid eating within two to three hours of bedtime, and follow these guidelines from the American Academy of Family Physicians:

  • When you're lying down, try propping up the head of your bed by four to six inches by placing blocks under the legs.
  • If you take naps, try sleeping in a chair.
  • Don't overeat.
  • Eat high-protein, low-fat meals.
  • Avoid tight clothes and tight belts.

Losing weight can also reduce your heartburn risk. Obesity increases abdominal pressure, which can push stomach contents up into the esophagus. In some cases, heartburn symptoms cease after losing only 10 to 15 pounds, the NIH notes.

Almost everyone experiences heartburn once in a while, but when symptoms are frequent and ongoing, it may indicate gastroesophageal reflux disease (GERD). If making lifestyle changes or taking precautions doesn't help to alleviate your heartburn, talk with your doctor. He or she may want to test for GERD, acid reflux disease, gastritis (an inflamed stomach lining), an ulcer, or a hiatal hernia.