Caffeine itself can also trigger heartburn. It relaxes the esophageal sphincter, which is a common cause of acid reflux.4 It can also increase the release of acid in your stomach, causing it to reflux back into your esophagus.6 If you find that other caffeinated beverages, such as soda or teas, also cause heartburn, it may not be the acid in the coffee but the caffeine.