In my case, lighting turned out to be a big issue. All of the following proved necessary:
* Blackout curtains that made my room darker at night * But, they were curtains. So, they were not so dark that no light came in in the morning. This helped me wake up * Better interior lighting for night. I bought some "bedtime bulbs" after I saw them on HN, and installed them in my lamps. They're very warm, and I feel sleepier * A red light in the lamp by my bed for reading * Morning light. First thing I do upon waking is walk outside in the light, and try to get in the sun. Even in Canadian winter * Morning light, part 2. I use a wakeup light, after reading about the one Sam Altman used here: http://blog.samaltman.com/productivity * I use "reduce white point" on my phone past seven or so. It's set fairly high * I make a point of getting ready for bed, and avoiding screens. So last hour is just getting stuff wrapped up for the day, hanging out, etc * Sleep tracking. I use an apple watch, and auto sleep. I more or less centre everything around getting as much as I can. It's massively improved everything else in my life. This tracking is also how I measured the effectiveness of the changes above.
All of the above basically reset the circadian rhythm. That was why I kept going to sleep later than intended. Again, I had years of what seemed like onset insomnia. Now, I more or less don't. I still take longer to fall asleep than my girlfriend does, but I regularly am asleep before 11, rather than 1-2 am. And I feel much happier for it.
I also use .3 msg of melatonin, around 5-6 pm, following a tip here about dosing. (Apparently it's either that, or a larger amount right before bed)
Just now, I noticed I felt awake and realized I had left the overhead lights on. While typing this comment I turned them off, turning on the lamps with warm lights, and feel sleepier.
I suspect that's not quite how the original article meant it, but looking at my process in hindsight, it was fairly simple. Just basically continual assessment focussed on "why". Why was I not sleeping? And what do experts recommend for circadian rhythm.