In all of Walter Mitty's daydreams he is playing an heroic leading role. It has been pointed out that the roles and settings are the kinds that would be found in popular fiction and Hollywood movies. The film roles might be played by popular movie stars of the period such as James Stewart or Clark Gable. In other words, the roles tend to be stereotypical. Mitty casts himself in age-appropriate roles in these daydreams. He is never doing anything that would require youthful athleticism, and he is not involved in love affairs with beautiful young women. It the first episode, for example, he is a naval commander. He would have to be in his forties or fifties to have worked up to such a senior rank. The same is true of Walter Mitty as a distinguished surgeon. One possible exception is the role of a flying ace--but he sets the episode back in time to World War I, and even then he appears to be a senior officer in charge of the whole flying corps. In most of his daydreams Mitty has nerves of steel and remarkable expertise. The Walter Mitty of his daydreams are the man he would like to be rather than the man he knows he really is.
Young boys typically indulge in fantasies in which they are doing heroic deeds on athletic fields, or battlefields, or perhaps somewhere in outer space. It is interesting that Walter Mitty is still indulging in daydreams of glory but that his fantasy roles have aged along with his real chronological age. In his daydreams he is a middle-aged hero who does not have to exert himself physically--or romantically. In the finale he only has to stand in one place smoking a cigarette while the firing squad gets ready to shoot him, probably for being a legendary spy.
Walter Mitty is not unique. A lot of us have secret lives--but nobody suspects us because we keep them secret!