In sleep medicine, there’s really no satisfying answer to why some people move their arms or legs during sleep. In general, it’s thought to be neurologic in origin, with dopamine as one of the main components. The same applies with TMJ problems. One of the minority opinions amongst sleep doctors and sleep dentists is that jaw clenching is a protective reflex to wake the obstructing patient, leading to increased muscle tone. This allow the person to breathe again, but in the long term, you’re not able to stay in deep sleep.
Here’s an interesting study which showed that when technicians raised the nasal airflow signals to very smooth, rounded tracings (elimination of flow limitation), limb movements dropped significantly.
As you can imagine, this has huge implications. I’ve always suspected that muscle twitches (arms or jaws) are a protective reflex.