Late here, Debbie, but I hope you're having a much better day today!
Quite often when I wake up, I'll stretch my legs before I get out of bed, and get a cramp somewhere in a leg, foot, or toe (my right leg is worse, for some reason). I then jump out of bed (haven't fallen yet, but I'd better watch it, right?), and walk around, which stretches the cramp.
There are times I've had cramping as you mentioned--it hangs in there for hours (why??). I agree with all the advice above--potassium tablets, bananas, staying well hydrated, etc., and if worse came to worse, I'd resort to taking a Flexeril tablet. I so dislike meds, but there are times I'm so thankful for them.
Anyway....I hope today is much improved!