During the day, gravity quietly does most of the work keeping reflux down — whatever comes back up has a straight path down again. Lying down removes that advantage. Stomach contents can sit right at the entrance to the esophagus, held there by nothing but the lower esophageal sphincter, which for many people isn't closing as tightly as it should. Saliva production also drops during sleep, and swallowing saliva is one of the body's main ways of neutralizing acid — so the body's natural defense weakens at exactly the moment reflux becomes more likely. The fix isn't one thing: elevate the torso (not just the neck), finish eating at least 3 hours before bed, and sleep on your left side, which keeps the stomach-esophagus junction above the level of acid. Together, these address the two forces working against you at night — gravity and a stomach that's still full.
