This is clearly a middle aged/older man thing! But also, many men have tendencies to be grumpy and arsey and passive aggressive and moody at all ages - even when they're younger (20s and 30s.) . This is why (I believe,) many women don't like it when their husband is at home a lot. Like off sick, on a long absence of leave, generally not working/unemployed. Some women I know, (including me,) nearly lost their sanity when their DH was off for 4-7 months on furlough.
Some other posters come on here, and say 'why should he not be allowed in his own home a lot, if YOU are?'
But the reason, is because men dominate the home, the general space, and the atmosphere, and they dictate the mood.. They want/need everyone to know they're there, they are dominant, and as I said, they do dictate the atmosphere/mood in the home.
Some years ago, when our kids were little, we dreaded DH coming home from work, because we never knew what mood he was going to be in. His bad mood would affect the whole house. We would have a lovely light atmosphere where me and the DC were playing a video game, or Monopoly or something, and DH would walk in with a face like thunder, and just stomp upstairs. Then the whole house was suddenly shrouded in darkness, and the atmosphere was tense.
Some men just love to make everyone else feel like shit if they do. Women don't do this. Then again, women don't have these dark, miserable spells where they storm off in a mood and ignore everyone because they're pissed off with work (or something else!) They don't say 'I'm going to bed, as I'm tired and weary' and stomp off to the bedroom at 7.30pm and stay in bed all night.
Women don't do that because they can't. Because they have the kids to look after, a home to look after, and sometimes elderly and infirm family members/parents. It's amazing how men can just detach themselves from any family commitment like that. Women can't. DH would also (sometimes) find any little thing to moan and whinge about, and would go into a dark miserable mood about it all night.
DH is much better now (he is early/mid 50s,) and is not grumpy and miserable now. (not often anyway!) It was mostly from early 30s to mid 40s.. He has a part time job (27 hours a week, over 3 days,) and the kids have left home, and we do quite a lot of stuff together, and are financially comfortable. Not loaded but comfortable.
We struggled badly financially some years ago, and had quite a bit of debt. But we are debt free and OK at the moment. So I get that the financial strain and having to support a mortgage and family etc may have got to him, but I had the debts and mortgage too, and the kids, and I looked after them 90% of the time, and did everything in the house, and I worked 18 hours a week too. (2.5 days.)
So anyway, he is not a miserable grumpy git now, (to me or the kids.) But OMG he can moan! Not at me - or about me. About his health. And about his job. He has a different ailment every other week, and has been to the GP for something or other 17 times this year alone. I am actually amazed that they haven't pulled him up on it to be honest. He has been an 'ailment whinger' for about 5 years, and has had test after test and scans and X-rays and all sorts. Nothing is ever found. And if I have anything wrong with me, he always develops it too, and his is always worse! 
And... even though he only works 27 hours/3 days a week, he still moans about work too - every single day, and he is desperate to retire/never work again. He has about 13-14 years to go yet. I am sure he is making up some of his ailments in the hope he will be written off on full time sick and never have to work again. But because most of his ailments are fictional, the doctors aren't diagnosing anything, and neither are the specialists who give him scans and x-rays and various other tests. He makes me so cross because he is wasting so much NHS funds.
Also, when he is at home - around 70% of the time, he just talks and talks and can't seem to stand more than 30 seconds of silence. Some days, I can't do anything myself - read or watch anything - when he is here. I have to wait til he's in bed or at work. God knows how I'm going to cope when he retires! 
And he just sits there in his chair watching TV almost ALL of his waking hours. Drives me nuts. I have to stick a firework up his arse to get him to move and come out with me. He also does no housework, I do it all, and all the home admin too, and the washing and shopping etc etc etc. Yes yes I know! I shouldn't be doing it, but I fell into the trap of doing it when I worked 18 hours a week and he worked full time (some weeks 48 hours,) and the kids were little, and it never stopped. He will do the occasional thing if I ASK, but I shouldn't need to ask!
He does do the DIY/mows the lawns/fixes anything broken in the house/sorts the car etc, but I do everything else really. AND work 21 hours a week. And he drove me BATSHIT when he was on furlough for 6 months .. Barely moved out of his chair, and said how much he would love to just stay at home all the time. Oh the horror! He would just sit there all day every day, dominating the TV, and just constantly talking - 80% of it complete drivel!
Now I am moaning! 😂 But oh my days, that rant has made me feel good.
And I am glad to see it's not just me/my husband!