I just had my back teeth built back up to hold the lower jaw in it's proper place. They used a little more-permanent material this time, so hopefully it will last several months at least. What a difference! My jaw muscles etc can finally REST and when I chew, the jaw knows where to go and when to stop without overextending itself.
Sounds like your jaw muscles aren't getting any rest time...and the spasming during the night, due to the constancy of tenseness, exacerbates the situation. Catch 22.
Something I did while waiting the few days to get back into the DMD's office: I used tic tacs between my back teeth, to hold my jaw closer to where it belonged, and to allow my muscles to rest. You could try anything like that (don't chew gum, btw!) and see if say, after an hour or so your jaw isn't feeling better?