I've had it, not nice! I tend to get more cramps if I get dehydrated and from not moving as much.
One piece of advice I had that I've been trying is, sounds easier said than done, but is to relax and let the cramp do its thing, that fighting it and flexing muscles and such can make it worse and prolong it. I've been trying that and it isn't as bad as it sounds. Once it's relaxed a bit I get up (usually in bed or on the sofa) and walk on it to stop it coming back.
I assumed it was cramps/spasms.