Yes I also get an uptick in energy with heartburn. It happened once when I was mowing the lawn, normally I can manage 5 minutes at a time before I need to sit/lay down between mowing (we have quite a big lawn).
After the 3rd run I drank a fruit juice drink and it triggered heart burn, but it also seemed to partially resolve my energy block and I managed to do approx 22 mins of mowing the lawn with no issues...and much better mental clarity...now that’s quite an improvement!
As for why heartburn can result in temporarily improved energy and alleviation of symptoms, i’m unsure...it is surely worth looking into though!