I've trained myself to go to sleep around 12:30 every night and it seems to work. I almost always fall asleep with 5 to 10 minutes of getting into bed. I feel tired by the time I climb into bed My problem is waking up during the night to go to the bathroom and then getting back to sleep. Sometimes I do, sometimes I don't. I now sleep from 4 to 6 hours almost every night, which is better than 2 years ago when about half the nights I slept about only 2 to 3 hours. I gradually phased out taking a beta blocker blood pressure drug which aggravated my poor ability to sleep and that helped. I take a slow walk at night and finish about 1 and 1/2 hours before I go to bed and I think that helps (I also walk around 1 and 1/2 to 2 hours during the day and go to exercise classes several days a week). I do at lot of other things that may or may not help, like snacking on foods that supposedly help with melatonin production, urinating several minutes before I get into bed (and avoiding fluids for several hours before bedtime), staying awake in a dark bedroom 20 minutes before I climb into bed, paying attention to the overnight temperature to decide on how many blankets to use, how wide the window should be open, whether I should use the fan etc. I even rub Badger Sleep Gel on my face (contains lavender among other things). So I use a mutli-prong attack on insomnia. There is in my opinion no one simple thing that works.
Even with all the stuff I do I don't sleep 7 hours ever and only occasionally 6 hours. Of course what works for me may not work for you so you need to experiment.