Man here... although the 'from the woodwork comment' implies despite asking for 'our' opinion, it's not actually wanted...
I think both sexes can have that midlife crisis, but I think for very different reasons.
If we're going strictly by the media propaganda (not my opinion, I'm stressing that!), women will do it because they're looking at their husband at 40, and wonder 'why'. He was the romantic, safe option. He's now a bit more settled, perhaps not pulling his weight, not buying flowers as much, maybe leaving the childcare to her, not spoiling her out on dates, etc. She's remembering all those men who were giving them attention in their 20s... all those now in the friend zone... She misses that excitement, that freedom, all that attention. She remembers how she could go to a bar (or online) and get hit on constantly. She's now getting flirted with by 'Chad' at work, and is thinking, why am I settling, I've still got it!'. She now cheats on her husband/leaves him, but now Chad is not interested because he was only after one thing (and a single mum usually isn't that thing).
For men, the propaganda is different. With men the narrative spouted online is that they typically meet someone, and settle down. Have kids together. Wife gets distant, preoccupied, bossy/stressed due to change in priorities. Chances are she's now 'settled', maybe has put on weight from having babies, has no desire to lose it (and probably complains constantly about how she's unattractive). Sex declines because of babies, time, hormones, etc. The incel community will then elaborate further and say she's also very hard to live with. Feminism these days isn't 'man provides, woman maintains', it's despite wanting to be paid for on dates, big ring, dinners, etc, woman wants to be equal. This means she wants to be a boss babe, rather than doting housewife. As a result, she is also argumentative, controlling, assertive... all qualities typically associated with dominant men, and very difficult to live with for men.
That's the 'script' that appears to be pushed online these days. The majority of MN posts seem to say that women just want support, and that women are leaving men because men are getting lazy and leave all the housework and childcare to the women... whereas the parallel sites for men will say men simply want attraction, sex and 'peace and quiet', and this is what men end up losing over time.
Then as OP alluded to... suddenly that 'Diet Coke' contractor guy comes into the office, makes her feel sexy again... or that curvaceous secretary, who actually has time for him... I'd imagine that "I've still got it" feeling in your 40s (say) is actually quite seductive for both!