hello user 
thanks for the question
As you have told me that you have involuntary jerking movements while at rest 
first asses your calcium level and sodium level
now as your symptoms are saying it may be myoclonus
a kind of seziure
other symptoms:
do you feel some light or aur before the jerky moment?
it start from one limb and spread to another?
are you awake while all this thing happen ?
causes are :
Myoclonus may develop in response to infection, head or 
spinal cord injury, stroke, brain tumors, kidney or 
liver failure, 
lipid storage disease, chemical or drug 
poisoning, or other disorders. Prolonged oxygen deprivation to the brain, called hypoxia, may result in posthypoxic myoclonus. Myoclonus can occur by itself, but most often it is one of several symptoms associated with a wide variety of 
nervous system disorders. For example, myoclonic jerking may develop in patients with multiple 
sclerosis, Parkinson's disease, Alzheimer's disease, or 
Creutzfeldt-Jakob disease. Myoclonic jerks commonly occur in persons with epilepsy, a disorder in which the electrical activity in the brain becomes disordered leading to seizure
: what to do:
first relax your self : go n tell more abot this to your doc better a neurospecilist
get an eeg 
eat well 
you will be fine soon