Proper hydration is hugely important.
Water alone isn't enough. You'll definitely want to have an electrolyte drink with you as well.
I had some electrolytes on race day, but I don't think I had enough. My legs started cramping around mile 14, and it was so miserable. I had trained using a run-and-walk interval, which became impossible. Any time I stopped to take one of my walking breaks, the cramping just got worse. I ended up running the rest of the race without stopping, and I just wasn't prepared for that.