According to the International Foundation for Functional Gastrointestinal Disorders (IFFGD), "Gastroesophageal Reflux Disease (GERD) is a chronic disease that can occur when stomach contents repeatedly flow backwards into the esophagus (food pipe). Though generally a treatable disease, serious complications can result if GERD is not treated properly." GERD can have a dramatic impact on sleep, leading to risks of aspirating these stomach acids while sleeping, aggravating obstructive sleep apnea (OSA), and experiencing the sleep fragmentation that comes with every time you wake up to the discomfort of heartburn symptoms.
The IFFGD encourages people who have long-term problems with heartburn (more than once a week, worsening, or continuous over time) to talk to their doctor, as these symptoms may signal something more serious than occasional digestive distress caused by overeating. An accurate diagnosis can help you find the correct treatment so you can sleep comfortably again.
More information at the IFFGD website