It's true, BUT...... by the time your body says you're thirsty? You're 20 min too late. It's why people overeat.
All food, all liquids (sans alcohol) take 20 min to impact a human so that their hormones switch up whether they are hungry or thirsty.
That's why hydration to stop cramping is all about prevention.
Ideally you want salt, not sodium as well as potassium. So.... no joke. A PB and jell and a banana at half time pretty much ensures you won't cramp up in the 3rd or 4th quarter of football or lax or a 5 set tennis match.