Heartburn, also medically termed as pyrosis, is a burning pain in chest, just behind breastbone (sternum). The pain is often experienced some minutes after having meals, and made worse on lying down or bending over.
Heartburn occurs when stomach acid flows back up into the tube that carries food from your mouth to your stomach (esophagus).
Normally on swallowing, a band of muscle around the bottom of the esophagus (lower esophageal sphincter) relaxes to allow food and liquid to flow down into your stomach. Then the muscle tightens again.
If the lower esophageal sphincter relaxes abnormally or weakens, stomach acid can flow back up into your esophagus (acid reflux) and cause heartburn. The acid backup may be worse when you’re bent over or lying down.
Risk factors for heart burn include
• Eating excessively spiced foods, fatty meals
• Pregnancy
• Obesity
• Excessive consumption of alcohol or carbonated drinks with caffeine (most of the soft drinks)

Consider seeing a doctor if:
• Heartburn occurs more than twice a week
• Symptoms persist despite use of over-the-counter medications
• You have difficulty swallowing
• You have persistent nausea or vomiting
• You have weight loss because of poor appetite or difficulty eating
There are some medications used to treat this condition which act by neutralizing or reducing stomach acid. However, lifestyle changes are very important and can help ease heartburn. They include:

• Maintain a healthy weight. Excess weight puts pressure on your abdomen, pushing up your stomach and causing acid to back up into your esophagus.
• Avoid tight fitting clothing, which puts pressure on your abdomen and the lower esophageal sphincter.
• Avoid or decrease intake of foods that trigger your heartburn as mentioned above
• Avoid lying down immediately after a meal. Wait at least three hours.
• Avoid late meals.
• Elevate the head of your bed if you regularly experience heartburn at night or while trying to sleep
• Avoid smoking and alcohol. Cigarette smoke decreases the lower esophageal sphincter’s ability to function properly.