Provided there are no neurological or neurodegenerative causes such as multiple sclerosis, cerebral palsy, stroke, or spinal cord injury - extra calcium is usually the solution for muscle spasms or muscle cramps in many nocturnal cases.
The extra requirements for calcium may be a result of high protein or phosphate levels (kidney disease, poor diet), hormonal diseases or imbalances, nutritional imbalances (high Mg/Ca ratio, low pantothenic acid), celiac disease or other intestinal conditions that interfere with calcium absorption, prescribed medications that promote calcium loss, random self-supplementation of the wrong vitamins and minerals, and others. (see also Acu-Cell Nutrition 'Calcium & Magnesium').
When high calcium is suspected but no resources are available to measure cellular calcium levels (serum calcium cannot be used for that purpose), an acidifying approach may be tried such as taking a very large amount of Vitamin C for a few days. If the muscle spasms or cramps get worse, then at least one can assume that calcium was likely on the low side, and one needs to increase its dietary intake, and/or use calcium supplementation.
If on the other hand the muscle cramps or spasms improve, then calcium is likely too high and requires co-factors to make it more bioavailable by supplementing either magnesium, or a phosphorus source such as lecithin, a higher daily intake of Vitamin C, or one could increase one's protein intake as another option.
Consuming foods or beverages containing lactic acid is another acidifying strategy to reduce muscle cramps when working out, despite the buildup of lactic acid in muscle tissue during strenuous exercise being actually a common cause of muscle spasms or cramps. This happens from insufficient oxygen not being able to oxidize lactic acid, which would otherwise get rid of it from muscle. Inosine and creatin supplements also help to reduce the buildup of lactic acid in muscle.
As exercise tolerance increases from repeated training, it takes increasingly longer before lactic acid is produced in muscle, so there is less of a chance of muscle cramps to develop. Lactic acid is found in a number of foods and beverages, and it is also commercially added to increase their acidity (olives, sauerkraut, cheese, beer, soft drinks, pickles...). Lactic acid-containing drinks can serve as a valuable fluid replacement for athletes before, during, and after competitive training and exercise.
One-sided leg cramps or spasms can help with the decision of what to supplement, whereby the left side is usually indicative of calcium, while the right side is generally an indication of magnesium being needed, although some individuals require a calcium / magnesium combination for relief as a result of both being low. If right-sided muscle cramps respond to calcium (rather than to magnesium or other acidifying strategies), then dehydration is suspect, and extra sodium may be additionally required.
While electrolyte or other nutritional imbalances can be a cause or contributing factor for toe spasms or cramping of one's toes also, if one never experiences spasms or cramps in other parts of the body, then they may occur as a result of poor circulation, wearing tight shoes, or sitting in a particular position (car, plane, theater) for longer periods of time. Briefly exercising one's toes, or taking a short walk usually provides relief and resolves the problem.
If poor circulation causes muscle cramps, Vitamin E might be a good choice for its blood-thinning and vasodilating properties. Gingko biloba also provides a blood-thinning effect and may be considered.
Sodium and/or potassium imbalances tend to become more of a problem during, or after physical activity, but less so during rest, so for exercise-induced leg cramps or muscle spasms, their addition in the form of a sports drink, or through extra Sodium / Potassium supplementation in tablet form may be a consideration. However, sufficient hydration (taking in enough fluid) is equally important before, during, and after a workout!
In practice, not all cases are that straightforward. The following example presents the chemistry of an individual who experienced severe muscle cramps in his quadriceps (front of the thigh) within only a few minutes on an exercise bike. It also demonstrates a seemingly possible - but in the long-term incorrect - interchangeability of similar-acting minerals.
Since calcium is quite low in Ratio to magnesium, supplementing 500mg of elemental calcium per day quickly resolved the problem - but only symptomatically!
The right strategy of course was to raise sodium, since continuing to supplement calcium would in time only lead to a greater increase in cellular magnesium, which in turn would lower sodium even more and result in all sorts of additional medical problems. While using extra salt works in some individuals, it will not work with low-aldosterone types (whose sodium levels are chronically low - even with high sodium intake), so supplements such as choline are indicated instead to raise sodium levels, which in time will lower magnesium also and thus normalize an individual's Ca/Mg ratio as well. In the above case, silicon / silica (which also inhibits magnesium), was another very important addition.
Once it is established that calcium and/or magnesium are needed, then the mineral type should be matched to stomach acid levels. If they are high, then calcium / magnesium "carbonate" is preferable, and when low, "citrate" is better. Carbonate is also generally better with a tendency for diarrhea, and citrate is generally better with a tendency for constipation.
Since low calcium and/or low magnesium-induced muscle spasms or cramps go hand in hand with disturbances of bone mineral metabolism, it may be worthwhile to consult a medical practitioner and be evaluated for other possible medical problems such as osteopenia or osteoporosis, whereby additional supplements such as Vitamin D, or other dietary adjustments may be indicated.
Those suffering from leg cramps that are due to insufficient potassium intake should be aware of - or at least use their symptoms as a warning sign - that ongoing low potassium levels increase the risk for cardiovascular disease and/or stroke.
Acute muscle spasms in the back are oftentimes triggered as a result of injuries, but chronic attacks can also result from curvature of the spine (scoliosis), age-related degenerative disk disease, and/or spinal alignment problems. Osteopathic / chiropractic adjustments, physiotherapy, muscle relaxants, needle acupuncture, needle-less electro-acupuncture or electro therapy are common treatment options, depending on the type of medical system one is most comfortable with.
Nutritional imbalances, i.e. abnormal Mineral Ratios are also capable of affecting spinal alignment, or they can even lead to scoliosis over time (and subsequent muscle cramps and spasms), in which case drug therapy or frequent visits to a chiropractor, physiotherapist, or acupuncturist can become frustrating, since the therapy won't last. However, once a nutritional balance is re-established, the spine is less likely to go out of alignment and trigger muscle spasms, cramps, and/or other health problems.
"Sleep Starts" (myoclonic or hypnagogic jerks) describes a type of involuntary muscle jerking that takes place just before drifting off to sleep. While felt by most people at some point in their lives, these sudden muscle twitches or jolts don't generally interfere with someone's sleep unless they occur on a regular, nightly basis. When they start to take place seconds apart, they will seriously affect a person's ability to fall, or remain asleep. Some individuals experience shorter bouts that only last a few weeks, however other people are less fortunate and may suffer "sleep starts" for several months, or on an ongoing basis.
There are some known medical conditions associated with myoclonus, including brain or spinal cord injury, Parkinson's disease, Tourette syndrome, multiple sclerosis, stroke, epilepsy, drug or chemical poisoning, organ damage, and others, however "sleep starts" is considered to be a type of 'Periodic Limb Movement Disorder' that as of yet lacks a specific medical cause or has a known relationship to a specific medical condition, although females are affected more than males, partly due to monthly hormonal fluctuations that seem to aggravate this condition around the time of their menstrual cycle.
Standard treatments for "sleep starts" consist of clonazepam therapy (a benzodiazepine type of tranquilizer), which - while able to help the symptoms, invites the usual long-term dependency this class of drugs is known for. Some patients require additional drugs or drug combinations that may include barbiturates, sodium valproate, phenytoin, or primidone.
Unfortunately, nutritional approaches (as listed above) that are helpful for conventional muscle spasms and cramps do not offer any benefits for most types of myoclonus, however I have found Taurine in the 1500 mg to 2000 mg+ / day range to be somewhat helpful for "sleep starts," provided reasonable care is taken at the same time to avoid stimulants such as alcohol, caffeine, and excessive intake of white sugar, which are known to worsen symptoms.