I am affected by urges at night. I am handling urges on day time but at night it will be worst.
And after 10-20 days of reboot the urges are strong.
So i am trying it will not happen again.
Sorry for my relapse. I know I am on good streak last week.
Friend of mine has had good luck meditating before bed.
Others recommend staying off their phones (and keeping their phones out of the bedroom) for at least an hour before trying to sleep...and reading an actual book right before bed.
Also avoid junk food during dinner and afterward. If you get cravings, try a bite of something high in fat (not sugar).
Or you could try doing a yoga routine to pull out of the spiral. Maybe even a short one, or something like The Tibetan Rites would prepare you to sleep better. If it's too energizing, then do it earlier in the day.