Since recently I have a fairly good control over my insomnia. Key points for me are tackling my biggest issues:

__Issue 1: not wanting to go to bed__

By reflecting on the why and how, I can make myself go to bed much easier, even if I don't want to. It's just having a dialogue with myself

__Issue 2: not falling asleep__

1. Low dose of melatonin (0.3 mg): fixes the issue of falling asleep. I buy it in the Netherlands. It seems much better regulated than the US

2. Sometimes magnesium: fixes a bit of a restless leg issue I have sometimes

__Issue 3: waking up after 4 hours of sleep and not falling asleep__

The issue is that I can't take melatonin anymore. I've noticed it makes me too woozy during the day. Here is what works for me: relax, slow down thoughts; shift hyper alertness to a cozy, euphoric and safe state; reducing social media addiction. Let's go through these ideas one by one

1. Relaxation through slow breathing: basic but important. I've noticed when I don't do this but do everything else, then I can still fall asleep but it's harder

2. Reducing the speed and frequency of thoughts through breathing meditation: if I think too much, I can't sleep. Breathing meditation (observing the breath) has taught me how to reduce my thoughts. Sometimes I don't even do breathing meditation but I just focus on lying still physically and mentally

3. Increasing feelings of coziness through mindfulness meditation: for me the biggest breakthrough has been the focus on coziness. Extreme coziness makes my consciousness drift away. So even if I don't fall asleep, I don't mind

4. Increasing feelings of euphoria through mindfulness meditation and thinking of pleasant thoughts: in my case that's about being at locations I like, with the people I love, doing things I find fun. This is in the same vein of "think of pleasant thoughts". Well, yea, but it needs to induce a mild euphoric effect which aids coziness

6. Increase feelings of safety by telling myself I am safe: simply telling myself I am safe makes me feel more safe. I never noticed that I felt unsafe or anything but telling myself I am safe makes me feel more safe. Safety increases coziness

7. Reducing the amount of waking up by reducing social media addiction: I don't have data, but the anecdotal evidence on my part is that I noticed I woke up more often when I was severely addicted to social media. I think in my case it's because whenever I wake up, I wake up with a lot of energy. So after 4 hours of sleep, I feel tremendously awake. I noticed that when I wanted (social) media entertainment that I felt even more restless. So my suspicion is that feeling restless for more entertainment can actually wake you up

These are the strongest things I've noticed that are conductive to sleep for me, and I've tried a lot. I hope it helps someone. Almost no one talks about the feeling of coziness for me, but focusing on coziness is where it's at for me. Relaxation and pleasant thoughts are nice, but coziness is the main driver for me to fall asleep

There are many more things I do such as knowing what sleeping position I sleep best in, controlling temperature, controlling light, controlling sound, eyemask, standing up when the sun rises, having a sleep journal where I write down every time I have had a bad night sleep or really good night of sleep. Anything surprising needs to be logged and reflected about. Sometimes the answer comes quickly, sometimes it takes years