I agree with Choice-
Valerian Root & Melatonin are both WONDERFUL natural sleep remedies in my opinion. I've personally used both and had great results. I too had a horrible experience with Ambien and ended up throwing the entire bottle away.
Melatonin is produced in your body naturally. It's the chemical that signals your body to get sleepy when night time is coming. My husband took melatonin for a couple of weeks during a very stressful time and he had no problems with any kind of erection issues. You see, when the manufacturers list these side effects, they are listing them because somebody had that problem with it during the testing/trial phase- they don't tell you that this only happened to one or two people. Sometimes these side effects aren't necessarily from the medication either- it could have just been a coincidence that someone had a problem with obtaining an erection during usage you know what I mean?
Chamomile tea is another thing you can try, but it doesn't taste the best. I've tried it before and didn't notice a huge difference.
If you are having problems with sleep because of stress, you can also add some of the natural remedies that help reduce stress. St. John's Wart is a wonderful natural stress remedy and I swear by it. Sometimes our bodies are stressed and we don't even realize it, so give it a try.
Good Luck- hope you are able to get some rest.