I have a lot of anxiety, which I imagine is relatively common among the developer and tech community. Sleep and peacefulness does not come easily to me. I've tried taking naps at various points over the years, but haven't successfully taken one since I was about 12 or so. Sometimes I'll even lie in bed for 30, 40, 50 minutes to just try and take a short nap. Eventually I'll give up and wonder why I wasted all that time.
This will happen to me even if I'm extremely sleep deprived, and feel very physically and mentally exhausted.
Nope, well over an hour is my average. And that's at night in my bed after a full day work.
I think the most important thing I did was defining that taking one hour to fall asleep was problematic and then tackling the problem methodically. Seeing a doctor about it was on my scope had I failed to solve the problem on my own.
Just. I've never been able to do that. I'm always thinking, even when I am exhausted. (Usually then, about how exhausted I am.)
Otherwise known as "lettings your mind wander". Just go with it, you don't have to not-think. It is perfectly fine to spend 20 minutes laying down and thinking.
That then leaves enough to get 10 minutes or so of sleep and get back up 20 minutes after starting your nap. Much longer than that and you risk not getting up for another few hours.
Much less than that and you won't get any rest.
And yes, this works perfectly well even without falling asleep. Just lay still for 20 minutes and let your mind wander without distractions or worrying about what you're thinking about. Congratulations, you've just meditated.