The spasm of the calf and thigh muscles may be caused by the following reasons: 1. It may be caused by excessive fatigue, for example, the patient has done excessive exercise for the lower limbs, which may cause excessive fatigue of the muscles here, and then the muscle spasm of the two places at the same time when resting. 2. It may be caused by electrolyte disorders, for example, the patient has a lot of sweating, vomiting, diarrhea, etc., causing a large loss of electrolytes in the body, which may cause the spasm of the thigh and calf muscles at the same time. 3. The patient may suffer from electroshock injury, for example, the patient may suffer from electroshock injury recently, and the electroshock stimulation may cause spasms in the thigh and calf muscles at the same time. 5. It may be caused by excessive pain, such as a severe injury involving the lower extremities, which may lead to prolonged muscle tension in these two muscles due to severe pain stimulation, resulting in muscle spasm.