Explanation
The author—may Allah have mercy on him—states in his book Riyad al-Salihin: “Chapter on the prohibition of leaving a fire, or anything similar, burning in the house when one goes to sleep or the like.” The reason, as the Prophet ﷺ described in these hadiths, is that fire is an enemy to human beings. If someone leaves it burning and then falls asleep, the fuwaysiqa—that is, the mouse—may come, jab at it, and the flame may flare up, just as occurred in earlier times. Back then the lamps were open flames fueled by tallow, oil, and the like; later people used kerosene, and all of these are liquid fuels. Should a mouse tamper with such a lamp, the fuel might spill onto the floor, ignite, and the house would burn. For this reason the Prophet ﷺ instructed us to put out the fire before sleeping so that a blaze does not break out.
Today, however, lighting is not produced in the same way. We use electricity—a negative and a positive charge that power, for example, an electric bulb. If a person goes to sleep while a bulb is left on—what people call a sahariyyah (night-light)—there is no harm, because the cause for which the Prophet ﷺ forbade leaving a fire burning is absent in modern electric lamps.
There are nevertheless devices that resemble the earlier case, such as space heaters (dafāyāt). These are unquestionably dangerous, especially if someone places one near his bedding: he might roll over or touch the heating element. Therefore, such heaters should not be left on unless they are in a secure location, away from the bed, lest a fire break out.
Similarly, when a person goes to sleep, he should draw the door to—that is, close it—and he should cover his vessels, even if only by laying a stick across the top, for this affords protection from Satan. Allah alone grants success.