Cramps come from eloctrolytes/nutrition imblanace, but also overuse, and to a limited extent fit problems. You've got some good ideas for the nutritional stuff here. I like using HEED and two endurolytes per hour.
Try this link for info on the overuse part:
http://www.ultracycling.com/training/cramping.html
Lastly, a saddle position that's slightly off can stress certain muscles sometimes.