I wouldn't say that there is an obvious moral to this story. I suppose you could say that retreating into your imagination is a way of avoiding problems in your external, social world. In that sense, the social moral is that Walter should put the same energy he uses to daydream into transforming his social world and his marriage. His wife seems too condescending and Walter seems to come across as a hopeless dreamer. This is a chicken and the egg situation. Is it Mrs. Mitty's nagging that turns Walter to his imagination, or is it Walter's mental absence that drives his wife to frustration? Here the moral or lesson is that neither is engaging the problem. The problem, it seems to me, is they are bored with the redundancy of their lives.
When you talk about social morals or mores, this includes ways we should behave in society, matters of ethics and more broadly (in terms of mores) what is deemed normal or typical. For example, in terms of gender roles, men, in certain cultures and contexts, tend to be portrayed as rational and express themselves through action. In similar cultures and contexts, women are emotional, intuitive and express themselves more verbally. Clearly, these are stereotypes and since they are referred to as gender 'roles,' you can say that being a man or woman is a way of acting. Therefore, the woman can be rational and expressive through action just as a man can. Walter never changes externally because he rarely deviates in his outward behavior of inaction, the antithesis of his action-packed imaginary world.
In this story, it is Mrs. Mitty who is the dominant figure (at least externally) and it is Mr. Mitty who retreats into his own mind. This story also comments on the dullness of the middle-class adult. In this case, we sympathize with Mrs. Mitty's frustration but we also understand Walter's need to escape from the dullness of the repetitive, responsible life of an adult.
Walter's feelings of alienation may have started with some bad breaks beyond his control, but his alienation is sustained by his own daydreaming. To me, this is more of a social commentary about the working class than a moral. However, Walter could benefit by using his imagination in his external life. This may lead him to social and personal successes and might end the rut he is in. Were he to do this, Walter might even create an alternative 'role' for the so-called typical American male.
Walter would benefit from Ghandi's quote, which I would consider a moral worth living by. "We need to be the change we wish to see in the world."