It's important to note that he doesn't escape literally. He still lives his ordinary life, but he finds solace and excitement in his imaginary adventures. The film, based on the original short story, adds a layer of complexity by showing Walter's eventual pursuit of a real adventure that mirrors his daydreams.
Here's how Walter's daydreams function as an escape:
* He becomes a different person: In his daydreams, he is a war hero, a surgeon, a fighter pilot, etc., roles far removed from his reality.
* He experiences exciting situations: He encounters danger, romance, and triumph in his daydreams, which are starkly contrasting to his ordinary life.
* He gains confidence: While he is timid and unsure of himself in reality, in his daydreams, he is decisive, brave, and confident.
Therefore, Walter Mitty's daydreams serve as a psychological escape mechanism, allowing him to cope with the mundane aspects of his life by retreating into a world of his own making, where he can experience a sense of fulfillment and heroism that his actual life lacks.