I'm making my way through opiate withdrawal at the moment, something I've done many times; next year I can celebrate 45 years since my first taste. For me, once those first few days of grossness are over I become an insomniac - for weeks. Fortunately for me, unfortunately for Fern, our cat lost some of her tail last year, post surgery she was prescribed gabapentin (PRN); long course for a small cat, short course for an ape, but it did give me a couple of nights of rest.
Instead of passing the wee hours watching a movie or interneting* (as I did the first couple of weeks) I've picked up an old coding project that I hadn't touched for over a year. A DIY single user Fediverse instance. It's proving to be lots of fun. So when I went to bed this morning at 05:15 to awake at 06:15 for work, it was with more of a sense of achievement than despair.
* Not an actual verb, but context should provide meaning.