I'm inclined to believe grolby on this one, based on my own experience. I felt like I cramped because I just pushed myself too hard for too long and wasn't fit enough to continue work that hard.
I don't doubt that dehydration/lack of electrolytes can contribute to/cause cramping, but it really didn't seem to be the main factor for me in this instance.