But what's difference between taking prescribed drugs (e.g., Xanax) and using some cough syrup to deal with withdrawal?
Exactly.... if we don't know, we shouldn't be prescribing ourselves.
I think talking to a psychiatrist would be really helpful - at least it was for me. I've had insomnia for decades (now my mother tells me it's been since childhood). It's one reason I started relying on alcohol. My psychiatrist was able to put me on a non-addictive anti-depressant to take before bed that makes me drowsy. It works wonders for me.