V.W.
No worries. Check with your doc if you have any concerns about vestibular (balance/hearing) issues. Once you are sure there are no problems there...let it go. My brother did this (we called it "rolling"back and forth) from babyhood. Dr. said not to worry.. it is a self soothing mechanism.
He is 43 and still does it today. My kids pretend to be him by sitting in a chair and rocking their head side to side... lol. He only does it when he is tired,or trying to go to sleep. And oddly enough, for the longest time, his favorite hobby (as an adult) was being on the water fishing. I personally think the wave action on the water soothes him, as he def uses fishing as a way to relax and unstress from a week of work.
No worries.