Heartburn--also known as gastroesophageal reflux disease--can cause significant pain, discomfort, and disruption to daily life. Heartburn is caused, as you indicate, by reflux of acidic contents of the stomach up into the esophagus because of weakness in the muscles that are supposed to keep stomach contents from flowing backwards. Many factors can contribute to such reflux, including spicy or acidic foods in the stomach (which include many of the foods you listed such as coffee and tomato sauce); eating just before going to sleep at night (laying down means that gravity can no longer help keep food in the stomach); and obesity. Based on the symptoms you describe, it sounds like you do have acid reflux
and would likely benefit from some lifestyle changes as well as medical intervention.
In this case, the best thing to do is see your physician to discuss your symptoms in more detail. It will be important for a physician to take a full history and briefly examine you to ensure that there are no signs of something other than reflux to explain your symptoms. You doctor
may want to prescribe a medication that can help decrease the amount of acid produced by your stomach to help lessen your symptoms. In addition, he or she will want to talk to you about lifestyle interventions to help control your symptoms, including avoiding spicy or acidic foods; elevating the head of your bed; and minimizing eating before bed. Hopefully all of these things will help and you'll feel better soon. Good luck at your doctor visit!