A new study out published in the Journal of the American Academy of Psychiatry and the Law seems to answer the question in the negative. Psychiatric News has the backdrop:
The researchers assessed 270 Colorado prison inmates charged with violating prison rules and who, after a disciplinary hearing, were placed in one of three prison environments. Subjects in the first group, which included individuals with or without a mental illness, were placed in a super-maximum security environment in which they were locked in their cell 23 hours a day. Inmates in the second group, which also included individuals with or without a mental illness, were assigned to a general-population maximum-security housing unit, where they had more out-of-cell time per day than the first group had.
...Whereas some of the inmates' psychological health deteriorated over the course of the study, this was generally not the case, even among inmates in solitary confinement. "We were surprised that only a small number of inmates in segregation got clinically worse," Metzner told Psychiatric News.

Some of the most important studies in science are those that are expected to confirm what "everyone knows" and end up refuting it.