NHS Lothian has made the 500,000 investment in an initiative that will involve the city council.
It is aimed not only at rehabilitating old people in a more comfortable and familiar environment, but also reducing the number of people unnecessarily clogging up hospital beds.
The scheme will also allow medics to spend more time with the patients.
Jamie Hetherington, NHS Lothian's implementation manager for the scheme, said: "This investment will allow elderly people who are ready to be discharged from hospital the opportunity to receive ongoing rehabilitation in the comfort of their own community.
"The early results of the project are encouraging.
"It's about helping patients to receive more of their care in the community while maintaining the high standards of practice already in place. This will allow them the chance to benefit from completing their recovery in their own homes."