This is an excellent question and you have astutely recognised the important role that setting plays in this play. In many ways, the setting is meant to act as a powerful symbol of the Younger family and the pressures that they face. Note the way the initial stage descriptions describe their living room:
Its furnishings are typical and undistinguished and their primary feature now is that they have clearly had to accommodate the living of too many people for too many years--and they are tired... Weariness has, in fact, won in this room.
Such a description, as we come to see, perfectly describes the Younger family and the way that they are tired and exhausted from the many pressures that they face. Ruth is tired of all the work she has to do and the pressures of pregnancy, Walter is tired of not being able to provide for his family in the way that he wants to, Beneatha is tired of not being able to pursue her dreams, and Mama is tired of not having a home that can accommodate her family. The Younger family is in a state of crisis, and this is conveyed both through the tiredness of the living room itself but also through the rising sense of claustraphobia and pressure that is created through the setting. The characters literally have nowhere else to go, and can only explode and express themselves in this living room. The setting is definitely restricted, but this only serves to highlight the many restrictions facing a black family like the Youngers at the time of this play.