I get leg, foot and thigh cramping but always at night. Sometimes a cramp will last half an hour but more recently they've been rare and brief. I find that if I keep up with my regular exercise, they hardly ever happen.
A recommended "cure" for a leg cramp is to straighten the leg and bend the foot toward you, but I usually can't do that. The other night I actually managed to get my foot to move toward me, and the cramp did go away. That may be the only time that trick has worked for me. This article (and lots of others) recommends rubbing but that makes the cramp worse in my experience.
http://newsnetwork.mayoclinic.org/di...ht-leg-cramps/