I've been through similar, don't give up trying to find a solution. I've recently found what mine is, and am doing much better now. Everyone is different, be careful with advice on the internet, but at the least it gives you ideas for further investigation. For me it was elevated homocysteine, with a genetic origin. I could get an analysis by uploading my genome to Genetic Genie, but ultimately the homocysteine test was the proof.
I had elevated homocysteine, treated it (MTHFR gene, therefore methylated B12 / folate, etc), and that had zero effect on my sleep quality, unfortunately.
Tried B6, every variation of magnesium (including threonate), all the typical sleep hygiene stuff.. nothing mattered.