The window
Coffee is typically brewed near 200°F and is uncomfortable to drink above roughly 160°F. Below about 120°F, acidity flattens and bitterness becomes the dominant note.
Most tasters land on 130°F to 155°F as the range where sweetness and body are clearest. That is a span of twenty-five degrees, and an open mug crosses it in about a quarter of an hour.
There is also a safety argument. Very hot liquids are a known irritant to the mouth and oesophagus, which is a second reason not to gulp a freshly poured cup.
Why the same coffee tastes different at each end
Volatile aromatics evaporate fastest when hot, so the first minutes are all nose and little palate. As the drink cools into the target range those compounds stay in the cup, and perceived sweetness rises.
Bitterness perception increases as temperature falls further, which is why a forgotten cup tastes harsh even though nothing about the coffee changed.
This is why letting a good coffee rest for two or three minutes genuinely improves it, and why letting it rest for thirty minutes ruins it.
Staying in range
Preheat the vessel. It costs ten seconds and stops the first and steepest drop.
Cover the surface when you are not drinking. Evaporation is the largest loss channel and a lid removes most of it.
Keep the liquid moving if it is being warmed, otherwise you get a hot base and a cool top and neither is in the window.
If your cup routinely lasts longer than twenty minutes, a mug that actively holds temperature is the only fix that survives contact with a real morning.
A simple test
Pour your usual cup and taste it every five minutes for half an hour. Note the point where it stops being enjoyable — for most people that is somewhere between fifteen and twenty-five minutes.
If that point arrives before you normally finish, the problem is your mug, not your beans.