It’s called “bruxing”, and sometimes it’s caused by anxiety. Some people brux at night, and sometimes the shearing forces are so hard that a tooth can fracture. Your dentist can have a rubbery mold made for you to wear to protect your teeth at night, but for daytime bruxing you may wish to consult a psychotherapist. I know that sounds dire, but nowadays it really isn’t: there is brief, focused therapy to address these individual issues, and one can get relief in 6 to 8 weeks of treatment.