I've experienced the same situation and still do sometimes but not as much as before. I had a lot of hard times sleeping with thoughts coming in constantly to my mind. It was like I wished I can put a firewall in my brain. I used to smoke pot constantly because it relaxed me. Did take occasional sleeping pills but they were causing more damage.I was not able to sleep quickly and when I did it seemed like I couldn't get out of bed.
Anyway, I actually ended up leaving town which did help a lot. Changing settings helps changing a state of mind. I won't lie; the first few weeks were very difficult and I had a lot of mood swings but I kept reminding myself that I'm experiencing withdrawal symptoms so it's normal to feel this way. I would just have to be patient and wait for it to go away. If you were taking drugs (legal or illegal) for a while and then stop, the body will just need some time to adjust itself. I'm sure you know this but it always helps to keep reminding yourself of that fact and that stage you are going through whenever you feel irritated and if you can move out for a while with someone supportive to a different city or country like take a vacation if possible so you can relax your mind.If you still feel you need medication try lowering your dosage bit by bit.
Hope it helps.
Good luck