Leg cramps occur in the elderly when they sleep, and there are several common causes: first, cold when sleeping, the spasm of leg muscles caused by cold at night can cause cramps; second, insufficient venous blood supply or patients with thrombo-occlusive vasculitis, some elderly patients with insufficient venous blood supply to the lower extremities are prone to spasm of the gastrocnemius muscle when sleeping at night with the stimulation of cold; third, low blood calcium. Patients have thyroid or parathyroid problems, or as in the case of osteoporosis accompanied by low calcium. In this case, the muscles of the lower limbs are more sensitive to external stimuli, often leading to muscle spasm and pain. If necessary, some calcium and osteopontin and more sunshine can help prevent cramps.