During a play – any play, not just Endgame – the characters are trapped on stage and forced to perform for an audience. Their space is confined. They are not free to move anywhere they please, and the result is that there are only so many things they can do. Sometimes, this limitation of action is underlined by putting a stage within a stage or a play within a play (see, for example, Shakespeare's Hamlet). Otherwise, we generally don't think of just how claustrophobic a place the stage can be.
In Endgame, Hamm's room is the stage within a stage. In their post-apocalyptic situation, the characters are stuck in this room with just a handful of props (the gaff, the stuffed dog, the picture, the alarm clock) and they make use of each of them. Hamm constantly insists that they keep a dialogue going, if only to keep his spirits up. If the room is onstage, the kitchen corresponds to offstage, and it is the place that Clov can go to take a break and get away from Hamm. Like an actor, since he can't actually leave, he goes there.
Critic Harold Bloom has raised an interesting question. If Endgame is a play within a play, what is the larger play that contains it? We'd like to turn that question around a little: if Hamm's room is a stage within a stage, what's the larger stage? What frames Hamm's room? The obvious answer is the theater itself – audience members included. It is an eerie feeling that Beckett has produced, an uneasy feeling by which he gets his audience implicated in the action of the play.