This is a pejorative style of behavior that can be part of the marriage dyad. One or both spouses are just plain negative about much of their world to the point it becomes their world. It is a form of depression and this depression could go back to childhood. The cause? A spouse seems to have little control over their life or circumstances. And even if they do, they have gotten into the habit of not having it.
If one spouse has chronic crabbiness, conflict will brew with the spouse who is not depressed (unless they, too, are chronically depressed). Paul overcame this in a Roman prison when he wrote that he has learned to be content in all his circumstances (Phil. 4:11). How did he learn this? By asking the Holy Spirit to help him. A husband or wife needs to ask God to help the crabby one stop displacing anger onto them or the world in general. Instead, they should put their anger at the foot of the Cross (1 Pet. 5:7) and try to discover the cause of their depression in the first place.