What are you talking about now? About tea or coffee? Because there is no difference - tea, coffee, borscht or hot water. It's all hot liquid. The hot liquid relaxes the muscles. Including the muscles that block the exit from the stomach and the entrance to the stomach. This is usually not useful.
Something I doubt that the author of the question had in mind the sphincter between the stomach and the duodenum. In any case, instead of boiling water, there will already be lukewarm water, which will mix with gastric juice.
I suspect that it was about the lower esophageal sphincter, due to the weakness of which there is a reflux of gastric contents into the esophagus. This reflux can manifest as heartburn.
So, brothers, if you drink hot liquid (including just hot water) against the background of heartburn, then you will get worse. When stomach acid has been scalding the esophagus for a long time, it becomes too sensitive to hot. Well, roughly, as if you ate hot pepper, and then decide to wash it down with hot tea. Have you tried this? Immediately the burning will become stronger.
In itself, increased heartburn from hot drinks is listed as a symptom of reflux. That is, this is not a method of treatment, but a provoking factor. Got it? It's like being told that one of the treatments for a broken leg is the pain of jumping on that broken leg.
Briefly speaking
From hot water, heartburn worsens not only because boiling water scalds a sore spot in the esophagus, but also because hot water even more relaxes the already relaxed sphincter between the esophagus and stomach.
I never cease to be amazed at this allegorical obscurantism, when morning tea is shyly called a glass of hot water in the morning. Everyone drinks it anyway, and do not bother. Or tea or coffee. A glass of hot water has no magical properties in the morning.