On the prohibition against leaving a fire and the like burning, whether in a lamp or anything else, when going to sleep

Riyad as-Salihin (The Meadows of the Righteous)

by Imam Nawawi

300. Chapter: On the prohibition against leaving a fire and the like burning, whether in a lamp or anything else, when going to sleep

1652. Ibn 'Umar reported that the Prophet, may Allah bless him and grant him peace, said, "Do not leave fire burning in your houses when you sleep." [Agreed upon]

1653. Abu Musa said, "A house burned down with its inhabitants in Madina one night and when the Messenger of Allah, may Allah bless him and grant him peace, was informed about it, he said, 'Fire is an enemy to you. When you go to sleep, put it out.'" [Agreed upon]

1654. Jabir reported that the Messenger of Allah, may Allah bless him and grant him peace, said, "Cover up containers and tie up water-skins. Lock the door and put out the lamp. Shaytan does not open up a water-container, open a door nor remove a cover. If one of you can find nothing except a piece of food to place over his container together with mentioning Allah's name, he should do that. A mouse can set a house alight around its inhabitants." [Muslim]