Heartburn is most commonly caused when the esophageal sphincter relaxes more often than it is supposed to, allowing stomach acid to flow up into the esophagus.