Saw a child today whose parents were worried that he kicks his legs, while watching iPad. I said, the treatment is simple – Take the iPad away!
These repetitive, non-purposeful movement are called TICS. They can be in many forms like, smacking of lips, eye blinking, shrugging of shoulders etc. Treatment is to ignore them and they usually go away. They may happen more when the child is tired.
Once the diagnosis is confirmed, by someone experienced, try distracting the child. Don’t ask them to stop doing them. That reinforces the habit and make it worse.
http://www.nhs.uk/Conditions/Tics/Pages/Introduction.aspx