Age Scotland called the deaths “tragic” and called for urgent action to tackle the growing problem of delayed discharges and an over-stretched social care system.
The figures, obtained through Freedom of Information legislation, reinforce concerns raised by previous research by the charity which found that people in Edinburgh and West Lothian have some of the longest waits for social care in the country.
Across Scotland, 474 patients, mainly older people, died in Scottish hospitals after their discharge was delayed. The vast majority - 423 - were waiting for health and social care packages to be put in place.
NHS Lothian had the highest total number of deaths, with 86 patients dying between April 2018 and March 2019. This was followed by NHS Grampian (at least 83 deaths), Lanarkshire (78), Greater Glasgow and Clyde (69), and Ayrshire and Arran (59).
A similar number (88) died while delayed in Lothian hospitals the previous year, but that was a significant rise on the 32 deaths recorded in 2016/17.
Age Scotland's research earlier this year found the average waiting time for people to get social care after being assessed as having "critical" or "substantial needs" was five weeks in Edinburgh and more than six weeks in West Lothian, despite the Scottish Government's six week guidelines. The longest wait was more than 35 weeks.
Brian Sloan, chief executive of Age Scotland, said: “It’s tragic that dozens of people died while stuck in Lothian's hospital last year, instead of in their home or community. These are people who were well enough to be discharged, but most were delayed because the social care they needed was not available.
“While these deaths were not caused by delays, we know that spending unnecessary time in hospital increases the risk of mobility loss and infection, as well as loneliness and isolation.
“Many of these people had been in hospital for weeks, spending the end of their lives feeling isolated on hospital wards instead of in the comfort of familiar surroundings. The overwhelming majority of people say they would prefer to die at home if possible, or at least in the comfortable setting of a care home.
“Despite the Scottish Government’s repeated promises to tackle delayed discharges, these figures show that the problem is spiralling out of control. It's unacceptable that people in Edinburgh and the Lothians face waits of up to 35 weeks to get the care they need. We urgently need more investment in our social care system, so that every older person can access the care they are entitled to.”