I agree with some of those people that said depending upon the severity of the WDs, there are some times when sleep is not going to happen. For example, having been through the drama with various opiates/opiods (Hydrocodone, Oxycodone, Morphine, Fentanyl), I can tell you that Fentanyl was the most extreme WD torture I have ever experienced, by far. There was pretty much zero sleep during the first week or so, which exacerbated the nightmare of the affair wildly. Even after that, the PAWS was insane, and I really did not sleep properly for many months. Again, made the WDs far more torturous. Just what your brain and body DON'T need when you are trying to heal, of course. Even boatloads of Valium did almost nothing, other than make me feel brain dead. Tried Trazadone, did nothing but make me feel like complete garbage. I tried pretty much everything and every combination of things and in the end, I just could not do anything other than pass out occasionally, for short periods, usually minutes. Even the morphine, as bad as it was, was nothing compared to the Fent WDs. There is nothing anyone could ever do to convince me to touch that shit ever again. This Fent experience was the closest thing to a living nightmare that I could have ever imagined, and again, even morphine was easier, as shitty as that was.
Anyway, good luck, my friend. Things will get better if you get off the opiates. Once the hooks are out of you, you will begin feeling better. If I can do it, anyone can.