Hi there and thanks for posting this question!
Number one I would go to a neurologist and check extensively if there are any abnormal functioning in the brain. Stress and Anxiety can contribute to some additional stress and the body can respond in strange ways like developing a habit or a tic of shaking head but maybe not, maybe is more serious or maybe is nothing so that is why you need to rule out serious neurodegenerative diseases like you mentioned.
Now tics normally develop in early years. Tourette syndrome (also called Tourette's syndrome, Tourette's disorder, Gilles de la Tourette syndrome, GTS or, more commonly, simply Tourette's or TS) is an inherited neuropsychiatric disorder with onset in childhood and it is expressed in chronic tics. Probably a neurologist can help you if that is the case or why it has developed at this time but again i would recommend go to the doctor and get a serious examination
Meditation and exercise can help but if you clearly see a more frequent abnormal response like you say i would go and check it right away.