There is a sphincter between the esophagus and the stomach that normally stays closed unless you are swallowing something that needs to be passed into the stomach. This is called the gastroesophageal sphincter.
In a normal healthy human, this sphincter prevents things going from the stomach to the esophagus. Even when you are “hanging upside down”.
(If you don’t know what a sphincter is an example: your anus is a sphincter)
Latest Answers