Derek McGill said he could fill an entire hall at Barlinnie with people who have mental health problems – and claimed the prison could help them to stabilise and reduce the chance they will reoffend.
However, he insisted many "shouldn't touch" the prison system and said jail conditions could exacerbate their illnesses.
Of a prisoner population at Barlinnie of around 1100, as many as 260 could be classed as having mental health problems, Mr McGill claimed.
He added: "We've got people here who shouldn't be in prison in the first place.
"We have five people a month who are convicted by the courts, but are sectioned and should go to hospital. There are no beds available at the State Hospital or in the community, so they are committed to Barlinnie.
"On top of that, we have two or three people a month here who we section ourselves and take to hospital."
The problem is long-standing, but so widespread that Barlinnie has set up a day-care centre within the prison where its most vulnerable inmates can access counselling, relaxation and yoga sessions, activities to improve their self-esteem and 'therapet' sessions with a dog which visits the jail.
Mr McGill said the day-care centre benefited the prison and the prisoners.
He denied it was molly-coddling inmates and said he did not wish to minimise the crimes they had committed, but he insisted the centre's work could actually cut crime when people are released.
"Some are in for quite serious offences. They need to be locked away for their own protection and the public protection," he said. "But we see lots of seriously ill people. We have quite a lot of people coming here that shouldn't touch here.
"Then there are people routinely here who are mentally ill, but not so ill they should be in a hospital. If we can stabilise them, get them taking medication and improve their self esteem, there is less chance they will reoffend when they go back into the community."
Prisoners on the main halls in Barlinnie, or in the 60 cells of the dedicated High Dependency Unit for vulnerable inmates, can attend morning or afternoon sessions in the day-care centre five days a week.
According to staff, many would otherwise remain in their cells throughout the day, or cause considerable problems in the life of the jail.
"It takes the people who would normally cause damage in prisons – by smashing cells and TVs or assaulting other prisoners or staff," Mr McGill said.
"Some of them react very badly to being in big crowded spaces or really noisy places. But if they are not well mentally there is also a need to do what we can to make life acceptable for them."
Despite the nature of its users, the centre has had only three violent incidents in seven years, according to staff.
A 2008 report from Scotland's then chief inspector of prisons, Andrew McLellan, warned that high numbers of people with mental health problems were ending up in prison and that it was not the appropriate place for them. Mr McLellan called for alternatives to imprisonment which could provide appropriate treatment and support.
The Scottish Association for Mental Health People says that custody can exacerbate mental ill health and increase the risk of self-harm and suicide. The charity says that people with mental health problems are disproportionately found within the criminal justice system, but are 11 times more likely to be a victim of crime than the general population.