I had acid reflux for years, went on a gluten free diet and it mostly went away. Then had an endoscopy done and found I have a minor hiatal hernia, now I make sure I don't eat for 2 hours before bed.
No more heartburn. As long as I sleep on my left side.