Yeah, generally, cramping is always the result of mineral imbalance or severe dehydration.
"pounding down water" and drinking coffee (a diuretic) are good ways to make sure you're disturbing any chance of keeping a beneficial mineral balance.
I guess all those ads for sports drinks are still missing their marks.