I almost never fall asleep before midnight, it's a habit that stuck with me after retirement. As long as I was active at work I had to get up very early, so it was normal for me to be asleep before ten o'clock. But now I can get up at any time, almost always between nine and ten in the morning, so I have no problem going to bed between twelve and one am.
Usually I go to bed and in five or ten minutes sleep comes, but from time to time it resists.
A few days ago I had one of those nights. I went to bed very calm, without any concern in mind and suddenly an idea began to come to me, I started to think about fear, why I stop doing many things out of fear, either because I fear that the result I want will not happen or that I think I do not have the ability to do that task.
As it usually happens in these cases one almost never knows why a thought comes, the fact is that it arrives, settles in our mind and is able to completely scare us away from sleep.

For several minutes I tried to ignore the thought, I took deep breaths, I counted up to a hundred in a backward direction, I tried to imagine a white wall, but none of these strategies gave me any result. There I was, lying there in the darkness of the night, with my eyes closed and with a persistent thought that refused to leave my head.
I thought I had better do something useful with this insomnia, so I went to the kitchen and prepared two cups of a very mild coffee, with a very small amount of coffee, just enough to tint the water black and give it a bit of a bitter taste.
I sat in my armchair with the cup of hot coffee in my hand and began to think about the idea of fear, which was the thought that kept me awake at night. Time began to run slowly and with each sip of that too-watery coffee, more ideas came to me. Suddenly I remembered something I had read somewhere, that fear was nothing more than a lack of love.
That idea was quite revealing to me, I saw a lot of sense in it. I did what I also do many times in moments like this, I looked for a notebook where I write down anything that comes to my mind and I started to write without much intention, just to let my thoughts come out, this always helps me to clear my mind.
After a while I began to feel calmer, it was true, surely those fears of failure that sometimes paralyze me have to do with some lack of self-esteem. I thought that if one could raise that love for oneself, surely one would feel capable of doing many things.

I got up from my armchair and went to warm up another small cup of coffee, I needed to feel the hot liquid in my mouth.
I took just a sip or two, placed the nearly full cup in the sink, let the tap water run over it, returned to the easy chair, and closed my notebook. I didn't even want to see what time it was.
I went to bed thinking that at some point I would look at the notebook and surely it would give me ideas to write some note like this one. Sleep came to me as I thought about that possibility.
The lights coming through the window and the birds singing told me that a new day had arrived...
Thank you for your time.
Translated with DeepL.com (free version).