No, your H isn't in midlife crisis. This is something else - and what it is, will require some sleuthing on your part.
Does he have a deep seated problem with monogamy, and were his apparently "out of the blue" mood shifts due to things that were happening in his relationships with other women that you didn't know about? Could there have been more cheating going on than you were aware of?
Does he have some kind of mood disorder such as bipolar disorder?
Could he have an addiction that you are not aware of?
Is it possible that he married you to get his green card, and once you'd been married long enough that he was "safe" from losing his card if you divorced, he no longer kept up his mask?
I know these are all distressing scenarios, and it's difficult to imagine that this person who seemed so loving could be duplicitous, but these things do happen.
If you had to guess, which of these scenarios sounds most likely to you?
(My story: was married for 24 mostly-good years, but there were red flags I overlooked from the beginning. There was an affair with an old girlfriend in the first year of our marriage that I forgave and put down to marriage jitters. An affair after 16 years of marriage that I DB'd our way out of. Then a classic MLC as he approached 50, we divorced and he's now married to an Asian girl 19 years younger. In retrospect now, 9 years after our split, I can see that he's a narcissist, and that he was never 100% in the marriage. I also suspect that there was more flirting and cheating than I was aware of.
Also, recently got out of a 4 year relationship with a man who treated me like a princess. Imagine my surprise on finding out he had another woman on the side for the last three years! And some of his "inexplicable" mood changes occurred when they were fighting, or he was stressing about keeping up his double life.)