Abdullah Kozan, who had asthma and diabetes, was first admitted to a state hospital in western Bursa province with a severe headache back in 1978 when he was doing his military service.
He died on Friday in his room, where he had spent the past 47 years, Dogan news agency said.
Kozan had been allowed to stay because "he had no place to go and he got on very well with hospital staff," workers told Dogan.
"He was like a member of our hospital. We protected him. But we couldn't save him when he got worse" during the recent Eid al-Adha Muslim holiday, one staff member said.
An undated picture published by Dogan showed Kozan, still alive, wearing beige and burgundy pyjamas as he sat on his hospital bed, with a doctor standing beside him.