I was having significant sleep issues more than 18 months before my diagnosis - very similar to yours, plus night sweats. That was one of many issues that led to a diagnosis of low testosterone and the use to exogenous testosterone. The testosterone fixed the sleeping problem quickly. Since my diagnosis, I've had to give up the testosterone, and the sleeping problems are back. And, they've been exacerbated by anxiety related to the PCA diagnosis as well.
From the time that someone suggested a biopsy, right up through my surgery, I would wake up and night, and instantly think that it was all just a dream. I didn't really have cancer. Then, I'd realize the cancer was real and I'd toss and turn the rest of the night.
Even post surgery, I'm still having sleep problems. So, HT could cause sleep problems, and maybe your T is still low after the HT ended. I'm sure mine is low, as it was before I started using T, and I'm guessing that's part of the problem.
I have found that a small doze of a benzodiazepine (Ativan, in my case) has helped me to get back to sleep, but it's not my preferred option. However, I'm going to stick with that for now. If my PSA is not at zero in July, and I can't resume testosterone, I will pursue something else to help me sleep, but the serious sleep meds like Ambien scare me.
It's not T level related, that I'm sure of.