1. Reducing caffeine intake. The science seems to be fairly conclusive that high caffeine intake is associated with bruxism.
2. Magnesium supplementation. Here the science is a bit less clear: I haven't found any study tying magnesium to bruxism, but there are studies correlating magnesium deficiency with conditions related to bruxism, such as anxiety and muscle tension. In any case I think the risks of magnesium supplementation are low.
I will say that my experience with grinding my teeth stopping was that it probably went away because of changes that were out of my control that made my life much less stressful. But those aren't much good as interventions.