Three of the dead men were at the country's largest jail, Barlinnie in Glasgow, with the fourth at Low Moss in Dunbartonshire.
Fatal accident inquiries will be held into each death. Two of the men are said to have died from natural causes.
The deaths come amid renewed warnings that Scottish prisons are at breaking point, with more guards going off sick and warders choosing to leave rather than deal with violent youths and geriatric sex offenders.
Warders are struggling to cope with a rising intake of older sex offenders after a number were convicted of historical offences. The over-50s are the fastest-growing age group in prisons. Hard living means that many have problems normally found in older pensioners, such as dementia, obesity, fading eyesight and amputated limbs.
Nigel Ironside, chairman of the Mr Ironside said: "We have somewhere in the region of 1,300 prisoners over the age of 50, which is the recognised age to be deemed as an older prisoner, as physiology of prisoners is about ten to 15 years older than the general population.
"That represents about 16 per cent of the overall population coming in later in life, and therefore we are dealing with a changing cohort that requires a different response."
Caroline Gardner, Scotland's auditor general, has highlighted a "significant" increase in assaults on prison staff, while stress-related sickness has risen by nearly a third in 2018-19.
"Thought of coming back is too much"
Phil Fairlie, Scottish national chairman of the Prison Officers Association Scotland, said that the increase in the retirement age for prison staff was pushing many to quit rather than return to work for the remaining years of their working life.
He said: "When they go sick in their forties and fifties, in terms of the retirement age having now disappeared into the horizon for a lot of the staff, the thought to come back is a much more difficult one to make, and actually a lot of the staff that are off sick just now will not return. They won't come back.
"We've got an awful lot of staff [for whom] the thought of coming back is just too much for them."
There are questions about the wellbeing of prisoners in an overstretched service. A fatal accident inquiry concluded in June this year that Mark Hutton, a prisoner who died in March 2016, was not given water for 15 hours, and was also denied food as wardens feared that he was on drugs.
The Scottish Prison Service is also struggling to cope with the influx of psychoactive substances which are constantly being reformulated, making them almost impossible to detect.