It's called bruxism (latin for "brushing") - an involuntary grinding or clashing of top and bottom teeth. I do it sometimes too - it's a side effect of stimulant meds. Usually it passes after some time but sometimes a change of dose or type is needed. I got a bruxism guard from my dentist to wear when it gets bad and it keeps the teeth from damage.
The dentist says it's a very common disorder and happens to many people during stress or when meds are used.
my son started to open and shut his jaw but he has had vocal tic s too was told i had to take him off the ritalin as it had probably unmasked the tics! When I first started taking Adderall XR, I had the side effect of jaw clenching and hitting my teeth together. This lasted for a few weeks, and then went away.