The leg twitching before going to bed is also known as gastrocnemius muscle spasm in the clinic. There are many reasons for gastrocnemius muscle spasm, if it is a teenager may be due to too much exercise or rapid growth and development caused by frequent episodes of seizures at night, do not have to deliberately treatment, seizures can be appropriate to go down to the ground activities, the intensity of the usual exercise should not be too large, warm up before training can be done. If you are middle-aged or elderly, it may be caused by osteoporosis, you can supplement calcium or anti-osteoporosis treatment. Pathological gastrocnemius muscle spasm is mostly seen in the lower extremity vascular lesions leading to poor blood circulation in the lower extremities, such as lower extremity arterial occlusive sclerosis, lower extremity atherosclerosis, mainly to improve the circulation of the expansion of blood vessels to treat the main. It can also be caused by weather factors or living environment, cold weather or living environment is too wet, cold, can also lead to gastrocnemius muscle spasm.