In reply to nathan79:
Right, but as I understand it (on the basis of Google rather than any direct expertise) the evidence just isn't there to support a link between salt / mineral deficiency and cramp. At least not in the context of cramp that is the result of exercise. It's apparently a myth (or early guess) that started from the observation that ships stokers were both (a) hot and sweaty and (b) tended to get cramp. Correlation does not equal causation, and all that. Studies looking at salt and mineral levels in people who do and do not experience cramp in marathons, for example, do not show reliable differences. Manipulating salt level and then inducing cramp (I'm not sure I'd want to be a subject in this one) shows no effect. And so forth.
I get cramp with depressing predictability, and really badly, on long, hilly runs. I'd love electrolytes to be the solution. The evidence just doesn't seem to be there, though.
The classic response to this is "well I don't know about the research but it works for me". I think this should be resisted (for, I think, obvious reasons).
I'm convinced that there's a genetic component, though. Although this is clearly fitness related, sort of by definition, I seem to get cramp when other people just seem to get slower.