I went through a similar thing where I had some trouble sleeping due to external stressors and then started to get freaked out that I was having trouble sleeping, having always been a great sleeper. I developed a lot of anxiety around it and it was pretty awful, though I'm mostly over it now. To me, the key was accepting that I might sleep poorly and being okay with that. That true acceptance allowed me to relax. (The larger context for me fwiw is trying to overcome my perfectionism.)