I think there are two separate kinds of cramps... dehydration / electrolye cramps, and muscle injury cramps.
For the former (I get these fairly often). Drink lots of gatorade (water and salt) and hit the bananas.
For the latter, massage and recovery. And it might mean you went to hard for your level of training and injured yourself.