Cramping is usually due to a deficiency. Either a deficiency of suitable training or deficiency in your diet. The former you of the two you can easily work out - is your training sufficient to do the work that you're trying to do? The latter can easily be ascertained from a quick doctors visit if nothing seems to be grossly missing from your diet. Keep tabs on everything you eat and drink and see if anything screams 'deficient' back at you. those 50 cent mini writing pads and a pencil could be the best diagnostic tool so you can ride your bike worth thousands of dollars without cramping.