I've always been pretty fascinated by why I get cramps in my forearms some days and not others.
I think fluid/electrolyte imbalance plays a role, but more importantly any muscle imbalances that you may have (which climbers are well known for) are the main culprit.
Since I began once a week gymnastic ring workouts to balance out the climbing muscles in my body, i've overall been able to keep cramps from occuring or only rarely on my most dehydrated and taxing outings.
But, F/E always seem to be the factor that triggers the cramps. I think it's important to realize that there are more than one type of way to become dehydrated: isotonic (loss of F and E in the same quanity), hyptotonic (loss of E in greater proportion than fluid/excess consumption of water), or hypertonic (too many electrolytes, not enough water). I swear i've had cramping episodes from all 3 conditions before.
With F/E, I think the key is to consume lots of water per climbing day 3-8 Liters (usually 4-5), but also every 3rd liter or so do some electrolytes. Also, as John says, diet plays a role as well. I try to eat a good breakfast with real food in it pre-climb (whole wheat burrito with veggies, eggs, and maybe a lean meat), bars, gu's, shot-blocks, electros thru-out the day, but also for the end of the approach and early part of the climb eat a sandwich with whole grain bread, lean meat, and veggies ( a bit of lettuce, onion, red/green pepper, no cheese). You need the micronutrients, that only real food offers, to facilitate the small cellular exchanges that are keeping you going on a long day in the hills.
Hope that helps, good luck.