The Hairy Ape is set sometime in early-20th-century America—likely in the 1920s, which is when O'Neill first wrote and released the drama. The physical setting switches from an ocean liner to New York City.
The physical setting of the ocean liner is important, as O'Neill takes care to emphasize that it should be depicted as a claustrophobic, constraining space, reflecting the way in which working-class people are constrained within their environment. Generally speaking, in The Hairy Ape, a characters' placement within the physical boundaries of their surroundings determines both their station in life and their opportunities going forward, as well as how they are viewed by members of their community. On the boat, Mildred and her aunt sit above the busy humdrum of the machine. Meanwhile, in the engine room below, Yank and the other men work tirelessly to keep the ship operating smoothly, allowing Mildred and her aunt to continue sitting in their nice clothes on the deck of the boat, blissfully unaware of the work required to move them across the ocean. This choice to use the setting's physical structure to mirror the oppressive structure of social class is both an apt and a common one in modernist literature.