Bro!
Heartburn is a reaction of the mucosa of the esophagus (not the stomach) to hydrochloric acid, which is released when eating.
If you train your legs with significant weights in deadlifts and squats, you should first check your condition (health) regarding gastroesophageal reflux.
And...