Lots of water of course, or Gatorade or another sports drink. But also make sure your helmet has enough decent sized holes in to provide good ventilation. I upgraded last year to a more expensive helmet, and found that my head stayed cooler longer, and I got less thirsty and less dehydrated.
Drink before you're thirsty, eat before you're hungry.