A Sydney man has died after spending 21 hours on a hospital floor after a stroke.

Alan Bugden visited Royal North Shore Hospital for a routine check up before collapsing in a toilet cubicle with a floor to ceiling door that prevented his escape.

He was found conscious the next morning but died from a blood clot in intensive care. Clot busting medication would have saved his life if he had been found by hospital staff hours earlier.