While I never experienced TMJ, I did go through a phase of teeth grinding. Mine was a result of caloric deficiency leading to hypothyroid symptoms.
I was experimenting with fasting, and when I was eating I had a diet that didn't contain nearly as many calories as I thought it did. As someone with a fast metabolism, it was a recipe for disaster.
Fortunately for me, its how I found Peat's work. Some of my other symptoms (the feeling of high stress hormones) lead me to the possibility that I was experiencing hypothyroidism. I did the Achilles tendon reflex test, and eventually came upon Ray.
I started tracking calories with cronometer, and increased my intake of starches in particular. It was tough at first, but I forced myself to eat more, specifically carb dense foods like rice and concentrated fruit juice. Fasting had kind of destroyed my ability to "feel" hunger so it wasn't fun eating at times.
I don't even know when the grinding stopped, but at some point I realized that when I forgot to put in my mouth guard before bed, I wasn't waking up with the edges of my teeth feeling rough anymore. Now and again if something happens and I don't eat enough, I won't feel hungry but I notice the stress horomones stirring up. If I don't correct it before bed, some grinding comes back. If I'm well fed, though, no issues ever.