Normally when you swallow, your lower esophageal sphincter relaxes to allow food to flow down to your stomach and then closes. But if the lower esophageal sphincter relaxes abnormally or is weakened, stomach acid can flow back up into the esophagus, causing heartburn. Left-side sleeping, say researchers, may keep the junction between the stomach and the esophagus above the level of gastric acid. Elevating the head of your bed by six to nine inches allows gravity to work for you by keeping the stomach's contents where they belong.