My dad used to suffer from insomnia, holding imaginary meetings in his head late into the night. I'm the same way.
One stress-relief technique from Johns Hopkins is a breathing + mantra exercise. I find their mantra recommendation cringey:
Breathing in I am calm, breathing out I am coping.
Mantras, guided imagery, and autogenic training are generally hard for me, because I feel pressure to "stay focused on the mantra."

My weird trick is to replace the mantra with free-form inner-monologue nonsense syllables. Here's an example:
Nimbla doobla deeble dee... simba dimba lima nooble doo...
I let the pacing and "mental voice" vary, but mainly aim for a sleepy-sounding tone.
At the same time, I let myself visualize nonsense images. My visual imagination isn't very vivid, and I don't try to create any specific images. It's nothing more than a patchy and low-res mental screensaver. Not even this exciting:

This puts me right to sleep.
If you have refinements of anti-insomnia tricks that aren't on bog-standard lists like this one, go ahead and add them in the comments!
I'm on a self-improvement binge (for about 15 years at this point) and though I don't call myself Christian, to sleep I recite The Lord's Prayer phrase by phrase, meditating on the meaning of each phrase--why it's there, what the intended effect is, whether I agree, and how I might do that thing if I agree. Stressing here that I am not praying: I am considering the meaning of one of the most widespread human mantras in my corner of the world.
If that doesn't work, my next step is to pray (again, I am not Christian--that's not what this is about) that everyone will do the right thing, whatever that is. Sometimes I direct it at current events, sometimes generally.
I think that it's the concentration that puts me to sleep, and the effects on my behavior and attitude are bonus points.