In cold weather I get cramp in the sole of my foot. Bedsocks are the best preventative.
I sometimes get cramps in the calves, most often after ceilidhs. I always try to have crisps or salted peanuts during the evening.
The only cure I know once they come on is simply to get out of bed and put some weight on the leg.