I have used several different things for sleep and other problems.
Cyclobenzaprine (Flexeril) is a muscle relaxer and also helps sleep. Especially if you have spams. It is one of the tricyclics.
Amitriptyline (Elavil) is used in low doses for pain and sleep. Also a tricyclic (is used in higher doses like 50-75 mg and up as an antidepressant). Doses start at 5 or 10 mg, then you can go up to 2 or 3 times that if you need to. You should have your liver checked periodically, it can accumulate in some people (but usually only at doses like 50-75 mg and up for depression. My body is weird, my liver enzymes start to go up even at small doses, but I will use it short-term for this.)
Benadryl (diphenhydramine) is good if you also have any congestion. Good to use saline nasal spray along with it (not necessarily at the same time) because it (or all of these, actually) can dry you out a lot. 25 mg (regular OTC) gives me 4-5 hours of sleep,usually. Some people have to take 50 mg for the night. That would dry me out too much, extremely dry throat, makes me cough, etc.
I will sometimes even split these pills if I don't need much. There are a bunch of brand name sleep meds that are nothing but Benadryl in disguise. Don't pay more for nothing! If it says, diphenhydramine, it's the same thing as Benadryl. By the way, it also comes in flavored chewables in 12 mg for kids. But they add flavoring and coloring & sugar, and it's "yuck" to me!
I've used generic Ambien (Zolpidem tartrate) 10 mg, for short periods of time. It can make you forget if you get up and do something at night - definitely 'hypnotic - sleep inducing'. But it usually works very quickly. Make sure you have around 8 hours to sleep, however!
Tylenol AR ("Arthritis Relief") comes in 8-hour, 625 mg doses (can take 2 if you need to, but keep track of how much acetominophen you take - it's in other meds too!)
When none of the above work, I have some Percocet (325 mg acetominophen, 5 mg codeine) left over from surgery recovery that I will take if I'm desperate. It's supposed to be good for 4-6 hours but I will sleep all or most of the night. Breaks the pain cycle for me. Used for a while, may cause constipation and other problems. Best for short periods, otherwise can become dependent.
Be aware that some of these can make you tend toward either constipation, or not urinating as frequently. (Amitriptyline & Nortriptyline are used to prevent bedwetting in small doses in children, I think!)