I've had a serious education in hydration this summer. Temperatures were often in the 40s for days on end.
For me, the headaches come from exposure to the sun (wearing a helmet with bandana on head). Regular breaks in the shade were necessary.
At night, cramping became a painful, regular occurance, eased somewhat by stretching before bed and electrolytes bought from a pharmacy.
I've had either tablets (swallow with water) or fizzy, flavoured tabs to mix with water. Both work well although the flavoured ones can make warm water palatable.
Nausea generally came from too much water. 4 liters would be a "dry" day for me. I could easily consume 8, even more.
I found that when I stopped for the day if I had access to cold water I could demish 2 or 3 liters in an hour.
When I could I'd alternate 7-up/Sprite with water during the day.
Tease!