Being a henpecked husband and dissatisfied with his own real life, it is humorous to see how dashing and heroic Walter Mitty becomes in his daydreams. He manages to escape all of his troubles (and his wife) during his mental escapades, and he leaves his mundane life behind for excitement that he has probably never experienced but is only too happy to imagine. He shows bravery and death-defying skills while daydreaming, but those around him can only shake their heads and laugh; the "puppy biscuit" remark is a humorous example. In the end, when he has to wait while his wife runs another errand, the desperation that Mitty feels comes out again as he dreams of a firing squad taking aim at him. In real life, he is unimportant; in his fantasies, he is "inscrutable to the last."
There are a couple of things that make me laugh about Walter Mitty's dreams.
First, he is always the hero or the star or the main actor in the dream. He is the one taking control of the action of the event. This shows that Walter may have a poor self-perception, but longs for a healthier, more confident outlook on life.
Second, I think his wife drives him crazy. Part of his detour from reality is to entertain himself and/or avoid her.
For a summary, see the link below:
Walter Mitty is a man who is totally dominated by his wife. In addition, he is really incapable of doing much of anything right. So he's really a complete loser in real life.
That, to me, is what makes his daydreams so humorous -- it is the contrast between how he sees himself in his dreams and how he is in real life. In his dreams he is brave, desirable, forceful and respected.
What also makes this funny is how he keeps getting jarred out of his dreams by things that make this contrast clear. For example, he dreams of being an important doctor but then he goes the wrong way into a parking lot and has to have the attendant park his car because he himself can't do it right.