It related to bruxism (night time tooth grinding)leads to TMJ problem,it caused by stress,sleep fatigue.
Good sleep,stress control prevent night grinding of tooth. And visit dentist for mouth splints
Or
In case of chewing habits like chewable tobacco habits leads to restricted mouth opening also
You should quit the habit by step by step and you visit dentist for further management
Or
In case of trauma to face it also cause restricted mouth opening because of unfavorable fracture
Next Steps
you visit dentist for further history taken and management
Health Tips
Reduce stress
good sleep
proper hydration
Quit tobacco usage should be done