I suffered from heartburn for many many years. Had a giant bottle of tums beside the bed and ate them like candy. Tried other medications as well.
Was diagnosed with sleep apnea and began using a bi pap machine for the apnea. To my surprise, the heartburn went away almost immediately.
As an aside, there is something called Barrett's Syndrome which is the result of gurd ( reflux) and very often leads to lower esophageal syncter cancer.
Don't just live with your heartburn...
P.s. Have lost a lot of weight and now do not need the Bipap or the BP Medication or the diabetes meds.
Diet and exercise do help...
Mike s