I've had trouble with cramps in my feet and/or lower legs for a while now and they can happen at night. I used to have to stand up or get up and walk around a bit to "cure" them.
Lately, I've tried something new to me. It's called dill pickle juice. Ya ya, that stuff you throw away after the dill pickles are eaten up. I now keep some in the refrigerator. When a cramp comes, I just go drink a couple of tablespoons of it and go back to bed. Within minutes...no more cramps.
If you like dill pickles and get a cramp now and then, give it a try. It works for me. Yea!