As everyone has mentioned, electrolytes play a key role in preventing cramps as does proper hydration, and the two must be used in moderation. As Machka said, calcium and magnesium are also very important electrolytes that 90% of people overlook. Another thing you might want to check is your fit. An improper fit can lead to cramps as I learned in the RFTR century. My seat was way too far back (After my tune-up hmmmmm

) and I started to cramp up severly in my hammies and calfs. Hope this helps.