Fasted way to stop the leg cramp is to stick a 99mg potassium tablet under your tongue for about 10 seconds. Then drink water and swallow it. It works instantaneously. I've used this remedy for 10 plus years. I have low potassium at least once a month due to a chronic vitamin deficiency from Crohn's disease.
Some how I discovered that taking potassium helps me with sudden gasping for breath, usually at night while trying to go to sleep or while sleeping, waking me up. Perhaps this is related to panic attacks, so I have heard it might be and fear is involved.
I take the powdered form of Now potassium. For some reason, they say you can take a higher dose.
I take 1/2 tsp 3x a day that is 175 mg 3x a day. I have been doing this for several years. Sometimes I try to stop but the symptoms return so I continue. It says on the container you can take that dose 4x a day.