Most of the action is set in Willy Loman's home and yard in Brooklyn, NYC. Because of recent population growth, the Lomans' house is boxed in by apartment buildings. Throughout the play, the big encroaching buildings are shown to choke the more natural beauty that once surrounded the Lomans' home. Once there were trees, and once there was enough sunlight to grow a garden. The looming buildings, which have separated the characters from nature, add to their feelings of confinement and desire to escape.
There are a few scenes that don't take place at the Lomans' Brooklyn home. We see Willy get fired in an office in Manhattan, and he also meets his sons at a Manhattan restaurant. There's also the scene where Biff learns of Willy's affair, which happens in a hotel room in Boston. The Loman house, however, totally dominates the set, perhaps highlighting Willy's longing to provide for his family, and showing that no matter how misguided he is, everything he does in some way revolves around his family.
We should also point out that the play, or at least a good portion of it, is set inside Willy's mind. The audience experiences many of the events through Willy's subjective viewpoint. All the flashbacks and blurred realities are from Willy's point of view. For more on this, check out discussion of realism and expressionism in our "Writing Style" section.
The time period also has a big effect on the action of the play. It's the late 1940s, meaning that we've just come out of WWII. The country is all gung-ho about rebuilding itself and getting everyone – yes, you've got it – the American Dream. Basically, the nation is just revving up for the economic boom of the 1950s. So, American commercialism as we know it is just about to take off in a really major way. This, of course, ties into many of the play's themes.