The Messenger of Allah ﷺ said, "Cover your vessels, tie up your water-skins, shut your doors, and put out your lamps, for Satan does not untie a water-skin, open a door, or uncover a vessel. If one of you finds nothing but a stick to lay across his vessel while mentioning the name of Allah, let him do so, for the little mischievous creature can set the household's house ablaze upon them."
عن رسول الله ﷺ أنه قال: غطوا الإناء، وأوكوا السقاء، وأغلقوا الباب، وأطفئوا السراج، فإن الشيطان لا يحل سقاء، ولا يفتح بابا، ولا يكشف إناء، فإن لم يجد أحدكم إلا أن يعرض على إنائه عودا، ويذكر اسم الله، فليفعل، فإن الفويسقة تضرم على أهل البيت بيتهم.
Muslim narrated it in the Book of Drinks (2012:96) via Layth bin Saad, from Abu Zubayr, from Jabir, from the Messenger of Allah ﷺ, as mentioned above. Bukhari narrated it in the Book of Drinks (5624) via Hammam, from Ataa, from Jabir, in abbreviated form, with the wording, "Put out the lamps when you go to sleep, close the doors, tie up the waterskins, and cover food and drink, and I think he said, even if only with a stick that you lay across it."