I can stop mine in a heartbeat with 200 mg. of vitamin B1. For a quick effect, open the capsules and dump the contents in your mouth. Then drink some water. In a avery short time the muscles start to relax and you can go back to sleep.
Hello~How long have you been having these? You could be low in potassium, magnesium, and calcium. I would suggest taking a good, food grade multi-mineral supplement. Also, try sitting in a warm bath filled with Epsom salts, about 1 or 2 cups. Epsom salts in a form of Magnesium and your body will "soak up" the magnesium. I have done this for back spasms, it is very relaxing.
If they get worse, I would see your primary doctor.
The general cause is low calcium and the treatment is two glasses of milk a day or a calcium supplement.
Ocasionally it is due to low magnesium.
The specific medication to relieve the cramps is quinine sulfate, which was sold for a hundred years for this purpose. Recently, the FDA banned the use of this medication for the treatment of "charley horse", although it is still available. For someone with normal cardiac function the risk is minimal.
When the pain comes on move the leg, use your fingers to massage the painful area the more you can move the muscle the less the pain ..
Have you been to your PCP/Family Physician to check to see if it is a lab that is low; i.e. Magnesium, Sodium, Potassium?