According to Sleep.org, grinding usually occurs while people are sleeping. It can also happen subconsciously during the day, either due to stress or discomfort from misaligned teeth. One way to avoid this problem is to treat the underlying condition by learning techniques to relax and minimize stress. A mouthguard can also be useful for protecting the teeth from grinding while patients sleep.