@themartinfamily To add - it can be a combination of dehydration AND electrolyte balance, namely salt/potassium (which is a salt in most forms but just making sure both sodium and potassium are called out).
In a heatwave, sports drinks are literally designed to counter your use case. Get some...