Unconscious leg twitching after sleeping, the reasons include pro-sleep myokinesis, seizures, as follows: 1. Pro-sleep myokinesis: this is a normal physiological phenomenon that may occur in 70% of normal people, and it is easy to occur when just falling asleep and about to wake up because the higher neurons of the brain are in a sleep state, resulting in a weakened control of the lower neurons, and a slight electrical stimulation can cause the lower The slight electrical stimulation can cause the low-level neurons to issue impulses and cause muscle contraction, resulting in transient twitching of the patient’s limbs. Sometimes the patient will jerk awake, but there is no other discomfort and no special treatment is needed; 2. Seizures: partial epilepsy can manifest only as limb twitching. Epilepsy is also easy to appear when just falling asleep or when about to wake up. The difference between it and prodromal myoclonus is that the patient will have abnormal brain waves, and epileptic waves can be found on 24-hour ambulatory EEG monitoring, such as sharp waves, spikes, sharp and slow waves, and spikes and slow waves.