Melatonin, sufficiently adjusted to your personal needs (timed/not-timed/combo, dosage, time of taking) will fix almost all sleep problems.
Melatonin is great for short term adjustment of your sleep schedule. If you have jet lag or quit your night shift job and need to shift your sleep hours forward or backward it WILL make you sleep for 8~ish hours and be rested. Just actually go to bed when you take it and you're golden.
My insomnia is so bad that I will stay awake for 2-3 days unless medicated or exhausted from work + exercise. Once you get to 3 days or more without sleep you turn into a crazy person. You don't hallucinate, you are
delusional. You will see things that aren't there and they won't seem crazy like demons and dragons and shit. You will see real things, they will appear 100% real and normal and then you realize your brain is fucking with you. I boiled a pot of water to make ramen and after like 10 minutes I looked at the pot again and realized that there was never any water in there to begin with.
Smoking "phantom cigarettes" is really common if you're a smoker and reach the delusional point of insomnia. You see the cigarette in your hand. You take a drag. Everyone nearby watches you pantomime the act of smoking with an empty hand. My brother has severe insomnia too and smokes. I caught him doing this a couple times when he was without sleep for days.
Sleep is a fucky thing. You'd think after millions of years nature would have figured it out.