Idiom: to be off the wall
According to the Historical Dictionary of American Slang off the wall is an expression which may come from sports:
The phrase off the wall, meaning wild, crazy, or eccentric is first unambiguously attested to in F.L. Brown’s 1959 Trumbull Park:
We all said thanks in our own off-the-wall ways.
And:
Not that off-the-wall holyroller kind of clapping.
There is an earlier use from 1953 in the title of a blues tune by Marion “Little Walter” Jacobs. But as this tune is instrumental with no lyrics, the sense of the title is ambiguous. It may be intended in the sense of odd, or it may literally mean something taken down from a wall.
The originating metaphor is unknown, but it likely refers to some sport, a racquet-sport like squash, or perhaps baseball, where a ball may literally be played off the wall, often with wild and unpredictable bounces.
(Source: Historical Dictionary of American Slang)
To expand on my comment: A rubber room or padded cell is indicative of a place where one who might be prone to injure himself might be secluded. This would include those of altered mental states, including those who would be considered "crazy". Thus, the environment being padded means that one attempting to harm oneself would bounce harmlessly off the wall instead of collide with an unyielding surface.
This environment would not be considered necessary for the general populace.