I would add though that insomnia creates cortisol, so testing cortisol and finding it high might not tell you the root cause. The high cortisol can be another result of not being able to sleep rather than the cause itself.
I think I'm going to need more estrogen and as I'm on 10 pumps am not looking forwards to that...