...can be caused by

not enough water
too much water
not enough sodium, calcium, potassium or magnesium
too much sodium, calcium, potassium or magnesium
too much exertion

its such a fine balance...

I found that when i drank ONLY E-Load i was cramping like crazy. So i have one bottle each of eload and water on rides.