I too, have struggled with sleep (mainly recently), and have OCD as well. I went down the path of Zolpidem (Ambien) and it made me severely depressed and anxious – I do not recommend ANY prescription medicines for sleep. Magnesium at night (600 – 1000 mg) works very well for me, though I will say that the most effective resource has been Sasha Cohen’s book, “The Effortless Sleep Method” – for those of us that obsess or worry about the lack of sleep and make it worse, this book helps restore your faith in your inborn ability to sleep, which we all have, by the way. The most effective thing for me thus far from Ms. Cohen’s advice has been to limit the amount of time I spend in bed; i.e., determine the minimum number of hours that you need to feel rested and functional, pick your wake up time (and stick to it every single day of the week – yes, weekends) and do not spend more time than this in your bed. If you find yourself waking up, not being able to sleep, then get up and read or listen to an audio book, work on a puzzle, etc. (in low light) until you are tired again and then go back to bed. This seems difficult, but it does work – it strengthens the sleep : bed association and lessens the anxiety associated with sleep. I would recommend a frank discussion with your psychiatrist about the medicines that you are on concurrently – they can certainly be contributing to your sleep issues – especially the zolpidem, as it is short-acting and is out of your bloodstream in a matter of hours, when it then begins to wake you up, and keep you up (often around 3-5 am).
Hope this helps!! God Bless –