Soreness and pain in both legs can not sleep, considering excessive exercise, lumbar spine disease, lower extremity vascular disease and diabetes, etc.. 1. Excessive exercise: strenuous exercise during the day or before going to bed, especially in the case of small activity suddenly after a large number of sports, resulting in the accumulation of lactic acid in the leg muscles, thus appearing two legs soreness and pain, generally through massage, rest can be relieved on their own. 2. Lumbar spine disease: lumbar spinal stenosis and lumbar disc herniation, sleeping flat on the lumbar spine nerves may cause compression of the nerves that innervate the lower limbs, thus causing the symptoms of soreness and pain in both legs. You can adopt the sleeping position of bending the waist and knees to relieve the symptoms of nerve compression, and if necessary, take non-steroidal anti-inflammatory drugs to relieve the pain, such as Loxoprofen and so on. 3. Lower extremity vascular disease: lower extremity venous thrombosis, arteritis and varicose veins of the lower extremities can cause poor venous return of the lower extremities, the blood can not be effectively returned to the lower extremities, stay in the lower extremities will cause the two legs soreness, swelling and pain. The lower limbs can be elevated and surgical treatment is needed if necessary. 4. diabetes: diabetes complications, there will be peripheral neuritis, the main symptoms include numbness and swelling of the limbs, can lead to two legs soreness and swelling can not sleep. The two legs soreness pain can not sleep is recommended to consult a doctor in a timely manner to clarify the cause of the disease, under the guidance of the doctor to standardize the treatment. The above drugs should also be used under the guidance of a doctor, and should not be taken blindly.