Sleeping pills are controlled substances in almost all countries. If you have a legitimate insomnia issue; consult a doctor and he/she should have no problem prescribing some for you.
By the way, to make this sex related; I have personally found that sleeping pills completely kill the sex experience. Do not take sleeping pills at least 24 hours before sex. I have experienced both PE and ED problems doing so.