I've had problems sleeping since I was ten years old, which got progressively worse by the time I was 16 when it became common to only be able to sleep after 2am, with many horrible nights when I couldn't sleep until 6am. Even today, I often have to binge crap and doomscroll Youtube just to tire out my mind enough that I can zonk out and sleep.
What used to help me sleep in the past few years was the "Ashes Against the Grain" album by American atmospheric black metal band Agalloch. I would usually play this album in those extremely bad nights when i'm still awake at 5am. I would often fall asleep before the second song begins.
In my early 30s (36 as of writing this) my psychiatrist discovered that I have ADHD, which helped to make sense of a lot of things in my life, including why I have trouble sleeping. Atmospheric black metal can help me sleep because the atmosphere is soothing, yet it is stimulating enough to clear my mind to allow me to sleep.
I find that what really prevents me from sleeping is the typical ADHD symptom of an extremely cloudy and foggy mind. Through experimentation, I recently discovered (in the past year or so) that taking my ADHD medication (Dexamphetamine) on those nights when my mind is too foggy and racing usually helps me sleep within 15 minutes of taking it. It was an odd experiment, because Dexamphetamine is literally the same drug as speed, a stimulant that recreational drug users to make them more awake. Therefore, I was taking a risk of it preventing sleep even more, but the brain fog was intolerable and I knew it would alleviate that so I gave it a go and it worked. I've done this quite a few times on those nights that are hard to manage and it works every time. ADHD is friggin unpredictable and it sucks lol.
Another thing that helps me sleep is praying the Rosary. In the past few years I've been getting in touch with my Catholic origins (was baptised as a baby, family isn't religious at all). I was very attracted to the Rosary for many reasons, and after praying it only a few times I directly experienced and observed how incredibly effective it is for entering a very deep state of meditation. I pray it most nights while I lay in bed, sometimes I'll fall asleep mid-prayer.