It goes back to the early days of theatre when a room was provided back stage for actors to rest inbetween scenes. It was believed that the colour green rested the eyes from the strong stage lights, so these rooms were painted in green. The phrase has passed into general usage for a backstage room used by people waiting to appear in a studio, or on stage - it may not always be painted green, but the term has remained.