Special units may need to be established by the Scottish Prison Service (SPS) to cater for increasing numbers of elderly prisoners.
They could be inside or outside the grounds of existing jails, according to the prisons inspectorate (HMIPS).
Figures from SPS show the number of prisoners over the age of 60 in Scottish jails has risen by a fifth in the past year.
It is spending £1m a year on social care packages for elderly inmates.
The HMIPS report "Who Cares? The Lived Experience Of Older Prisoners In Scotland's Prisons" said the number of inmates over the age of 60 had risen significantly in recent years and would continue to do so.
It said there was a pressing need for a clear strategic approach to tackle the challenges of responding to increasingly complex health and social care needs of older people in prison.
"This may require the development of non-traditional units for at least some older prisoner whether within, or outside the grounds of existing establishments," the report concluded.
In 2016 there were 280 prisoners in Scottish jails aged 60 or over. In July 2017 there were more than 340, with two-thirds serving four years or more, including life terms.
The oldest male in a Scottish prisoner is 85, the oldest woman is 73. The majority of elderly prisoners have been convicted in historical sex abuse cases.
The report said this group of prisoners had distinct needs for suitable accommodation, social contact and activities, but too many were not having their needs met in a satisfactory way.
One said: "I'm 72 and on the top bunk. I'm a lot fitter than my co-pilot, that's why I'm up there. I am a bit worried that I could fall and hurt myself when I'm trying to get in and out of my bed."
A staff member, quoted in the report said: "You've got no idea how difficult it can be trying to place some of the elderly prisoners.
"At times when we are trying to figure out where to put somebody we are literally having to make an assessment as to who can and who cannot make it up and down to the top bunk. Surely it's not right to put a 72-year-old in the top bunk?"
The Chief Inspector of Prisons in Scotland, David Strang, said the report highlighted the challenges of responding to the increasingly complex health and social care needs of older people in prison and emphasised their distinct needs for suitable accommodation, social contact and activities.
He said: "Many expressed their fears of growing old in prison and the possibility of dying alone. There is a clear need for such basics of life as suitable activities and social contact.
"I hope that this report will lead to effective change in the treatment of older prisoners in Scotland."
Former justice secretary Kenny MacAskill has advocated the creation of "secure old-folks' homes" to deal with the problem.
The HMIPS report makes no recommendation for change, but said the issues caused by the increase in the elderly prisoner population cannot be addressed by the SPS alone.
It said: "There is a pressing need for a clear strategic approach to a subject which has grown incrementally in importance, but without any specific strategy."
Mr Strang said: "Most older prisoners didn't want to be separated on the grounds of age from younger inmates. But in many cases they need extra support which can't easily be delivered within the mainstream prison system.
"There is a need to deliver care which is more in keeping with the reality of prisoners' situations than their own perceptions, but we are not advocating how that can be achieved.
"We are saying innovative and different solutions should be found, and this is a challenge for the Scottish government and SPS."
The SPS already provides specialist facilities and training for staff who manage distinct prisoner populations such as sex offenders, young people in custody, female offenders with babies and dementia awareness.
The report said creating separate provision for older prisoners in particular locations would enable SPS to make suitable adaptations to the environment and create teams of staff who were dedicated and trained to work with the elderly.
Tom Fox, SPS head of communications, said neither prison staff nor the health care staff who work in prisons were trained to provide social care.
"At present we are spending just under £1m buying in social care for those in our care. It's a significant cost," he said.
"What we have to do is develop a coherent strategy across the entirety of the estate to ensure the people in our care receive the support and services that they need."
Responding to the HMIPS report, Peter Dawson, director of the Prison Reform Trust, said: "This report highlights the challenges of providing effective care and a constructive regime for an increasingly elderly and frail prison population. It is a challenge which the Scottish Prison Service cannot meet on its own.
"Prison staff should not be expected to do the jobs of nurses and care providers. A comprehensive strategy is needed to ensure health, social care and criminal justice agencies work together to meet the needs of the increasing numbers of people growing old behind bars."