Yeah I used to get this, but this was before I was trying to quit PMO. I think it was due to anxiety, and having anxious thoughts at night. This would also mean that you'd struggle to sleep and would not have a deep sleep.
You should realise that anxiety is cause by P addiction but is also self escalating, in that you can get more and more anxious about being anxious. You have to be able to reduce stress....... so exercise, massages, avoiding stressful situations, and if your muscles are tight due to stress get someone at the gym to show you exercises to stretch your muscles and reduce them being tight.
Also if you are having trouble sleeping I'd suggest melatonin tablets, but use them infrequently and in a controlled way. You don't want to be dependant/addicted to something else. Oh and cut down on alcohol and caffeine!
If you don't think it is anxiety then ignore me!