There are many causes of frequent shaking in sleep, such as epilepsy, calcium deficiency and restless leg syndrome. Specific drug use should be chosen according to the cause. 1. Epilepsy: Some epilepsy will develop during sleep, which may be manifested as upturning of eyes, clenching and grinding of teeth, and twitching of limbs. It is recommended to consult a doctor in time, improve the cranial imaging and electroencephalography, and take antiepileptic drugs, such as carbamazepine and lamotrigine, etc., under the guidance of the doctor. 2. Calcium deficiency: Calcium deficiency will lead to a decrease in the threshold of neural excitation. It is recommended that the patient consult a doctor in a timely manner to test the blood calcium level, and if there is indeed hypocalcemia and other conditions, calcium carbonate and liquid calcium can be taken to supplement calcium and alleviate the symptoms. 3. Restless Legs Syndrome: Restless Legs Syndrome may cause frequent shaking of the legs before going to bed or self-consciousness of leg discomfort, it is recommended to consult a doctor in a timely manner, and take drugs such as pramipexole under the guidance of the doctor for treatment. There are many possible reasons for frequent shaking in bed, you should consult a doctor in time, under the guidance of the doctor to clarify the cause and treatment, do not just use drugs.