I like to drink a few cups of Sleepy Time tea, which can be bought at most grocery stores or at any place that sells tea. My favourite brands are Celestial and Bigelow. They're both fairly cheap.
Another thing you can try is exercises like jogging or yoga, but only 6 hours before bed time.
No electronics before bed, as the light stimulates the brain.
Don't eat for 4 hours before bedtime, as digestion keeps you up.
I'm very very cautious so I don't drink any caffeine at all but generally you don't want to have caffeine 5 hours before bed time (chocolate has caffeine in it, sadly.)
Some insomnia cases are caused by stress and anxiety, so try a long, hot shower and meditation, or reading a book or writing a story before bed time. Also, try not to work for about 2 hours before you head to sleep, as the two hours should give you enough time to stop thinking about work and relax a little. Also, when you can't sleep you usually get frustrated and, thus, stressed. Whenever that happens close your eyes and count to 10, inhaling deeply before you say the number and releasing your breathe as you say it, and if that doesn't work continue reading or writing. Just try to relax, even if relaxation seems impossible.
I personally take benadryl before bed as I'm under 18 and my doctor doesn't want to prescribe anything that can get me hooked. It's non-prescription, completely safe, and it has Diphenhydramine, which is a medicine that makes you fall asleep. That stuff can be bought at dollar tree, rite-aid, etc, so it's not like it's illegal or dangerous or anything like that.
Anyways, that's all I can think of at the moment, but if you try all those things together it should work. It generally works for me. Anyways, best wishes, and good luck. I know from personal experience that insomnia can be severely frustrating but remember, life goes on, and even if you don't get enough sleep, there's always coffee. Thanks