In the clinical setting doctors recommend prehydration as the most important way to prevent cramps in elite athletes. Typically the method is plenty of water 24-36 hours before your event, to the point your urine is light/near clear. 12 hours before your event be drinking 50/50 mix of water and electrolyte drink like gatorade. During event be drinking an electrolyte drink like gatorade.
Bananas are essential....good thinking!
Remember the fizzy All Sport? I liked the dark purple kind
Great advice.
On top of that, if you're already experiencing them, I usually end up taking in some extra potassium (bananas are optimal, and you can just go with potassium supplements, too). When I'd play baseball and get cramps from the heat and dehydration, I'd rock some tums and bananas (on top of drinking tons of water and my gatorade, powerade, or all sport).