Person who no longer has a day job for various reasons here. Highly erratic sleep patterns for years if not a decade plus being one of the reasons. You guys experience a certain diminution of hormones in middle age, but nothing compared to what we females experience in perimenopause and menopause proper. I could go on at length but will spare you. Except to say, for you married guys and those with female SOs, these conditions can last a very long time. Try to be patient and supportive. See that she gets tests for hormone levels, as they can affect mood to a great degree. Adding soy to her diet can help A LOT to reduce or even eliminate hot flashes, which are a constant battle during bedtime. There are other possibilities if she can't eat soy for medical reasons.
Yeah, I know, this is REALLY getting off topic. But it can potentially be helpful information, especially if your wife/SO has a history of mental illness, and/or it runs in the family, as is my case. Unfortunately many doctors don't connect the dots between all these issues, so women suffer more than they may need to.