A smoke alarm alerted the neighbour of a Sheffield man to a fire.
The resident in Oxspring Bank, Wadsley Bridge, had gone to sleep on his sofa after leaving his oven on with a small amount of food in a pan on top of it.
Firefighters were called at 1.30am on Sunday morning to the address by a neighbour who heard the alarm going off.
A spokesman for South Yorkshire Fire and Rescue Service said there had been a lot of smoke in the property.
The spokesman said the incident showed the importance of having working smoke alarms.