Leg cramps in the middle of the night may be caused by excessive exercise, low calcium, lumbar spine disease, etc. They can be treated by general treatment, medication (vitamin D3, celecoxib, etc.), and surgery under the guidance of a doctor. 1. Excessive exercise: If the patient exercises too much, it will lead to leg cramps in the middle of the night. It is necessary to pay attention to keep the legs warm and exercise moderately, and at the same time, it is necessary to carry out leg massage after exercise, which can help to relieve the pain. 2. Low calcium: patients suffering from hypocalcemia, will increase muscle excitability, thus causing leg cramps in the middle of the night, life should be more intake of milk, soybean milk and other calcium-rich foods, but also under the guidance of the doctor, through oral calcium tablets, vitamin D3, etc. for treatment. 3. Lumbar spine disease: lumbar disc herniation due to the nerve innervation of the lower limb area is compressed, thus appearing leg numbness, cramps, can be treated by oral celecoxib, methylcobalamin tablets and other medications, serious patients need to be treated by minimally invasive nucleus pulposus removal surgery. It is recommended that patients go to the hospital in time, under the diagnosis of the doctor, according to the patient’s specific condition, to take targeted treatment.