Thanks for using the forum. I am happy to address your questions, and my answer will be based on the information you provided here. Please make sure you recognize that this forum is for educational purposes only, and it does not substitute for a formal office visit with a doctor.
Without the ability to examine and obtain a history, I cannot tell you what the exact cause of the symptoms is. However I will try to provide you with some useful information.
Children can manifest many kinds of behavioural manifestations. One such thing is what is known as a stereotypy which is defined as a “repetitive, seemingly driven, and nonfunctional motor behavior that interfere with normal activities or that result in bodily injury.” Fortunately, many childhood habits are benign, are considered a normal part of development, and do not meet the criteria for a disorder; such habits typically remit without treatment.
Common stereotypies – These are by far the most frequent type and comprise habits such as nail biting and bruxism
Complex motor stereotypies – These consist of various repetitive limb movements
Complex motor stereotypies are further subdivided into primary or secondary. Primary stereotypies occur in otherwise developmentally normal children and usually remain stable or regress. Secondary stereotypies occur in conjunction with a neurologic or behavior disorder, such as autism, mental retardation, Tourette syndrome.
Other involuntary movements that may present similarly to stereotypies include tics and automatisms. Complex motor tics are also repetitive, involuntary actions.
Voluntary repetitive movements that mimic stereotypies include attention deficit hyperactivity disorder (ADHD), mannerisms, and compulsions.
Lastly, seizures can also present this way in very young children but being perfectly conscious makes it unusual for a seizure though still possible.
From your description, it is likely a stereotypy but could be any of the other things I listed above. My advice would by to take your child to the pediatrician and discussing concerns with him. If he deems it appropriate, he can refer you to a pediatric neurologist.
Thank you for this opportunity to answer your questions, I hope you find the information I have provided useful, good luck.