Before going to bed at night, that's a little hard but I can control myself here. But when I wake up in the morning, before I know it my hands are in my pants, and I hate this. Aside from this area of my life, I've completely eradicated masturbation (except occasionally in the shower, but I feel the trigger to that is this anyway). Yet it feels so demotivating when I cant stop doing this in bed. What should I do to prevent myself from doing that? I'm not really in an active or alert state, my mind just has one thing in it at that time, and that's to go go go. I've noticed this usually happens when I don't wake up with my alarm or if my sleep is disturbed by something. Seems like I'm waking up mid-REM sleep and that's why I can't do much, maybe? Anyways, I wouldn't call what happened today waking up in a rem cycle because when I feel that's the case, my mind's even more foggy. But I don't think that even happens much anymore. Please give me some guidelines and advice on how to stop myself from doing this before going to bed and right in the morning(if I successfully move up and sit in the bed, I've won, I don't do it then. But the problem is I don't think straight.). Any help is MUCH appreciated! I want to rid myself of PMO completely out of my life. I have completely gotten rid of porn, but rarely look at nudes online when I do this in bed sometimes.