There are plenty of sleep drugs, but first make sure you don't have Obstructive Sleep Apnea which definitely must be handled through whatever appropriate means and not paper over with drugs.
But if you have an hyperactive mind, took caffeine too late, or have dozens of others reasons for having poor sleep, please read up on natural things you can do in daily behavior and personal health, and if those don't help, here are drugs that can also help.
Falling asleep more quickly with Hypnotics
Those are ambien or sonata (US names, you can google for the molecule name like Zolpidem). They help quiet your mind if you're upset or have your mind racing, or took chemicals like caffeine too late and now you can't sleep.Those are to help you fall asleep, they will not help keep you sleeping 7h or more unless you take a very high amount, and the sleep you get with ambien, is not very restorative, so only use this as an occasional "fall asleep" aid, not a "take everynight"
Those drugs are known to cause some people to sleep walk. I personally would only recommend taking 1/2 or 1/3rd of a pill if you need a little kick to help. It's also helpful if you have to go to bed early due to timezones or whatnot.
Staying asleep longer
These drugs are multiple classes, and not being a doctor I won't do a poor job but basically they are not going to help you fall asleep quicker unless you take them 1h or more before bedtime. They are useful to be drowsy and stay asleep longer. For me they are especially useful to go back to sleep when my mind starts waking up after 5h of sleep.These are all off label, meaning they are meant ot treat something else, but can help to stay drowsy. One downside is if you take too much, you'll still be drowsy when you wake up, so you should adjust dosage by trial and error.