Sunan Abi Dawud, Book 27, Hadith 63 (Abu Dawud 3732)

Jabir reported the Prophet (ﷺ) as saying:

Shut your door and make mention of Allah's name, for the devil does not open a door which has been shut; extinguish your lamp and make mention of Allah's name, cover up your vessel even by a piece of wood that you just put on it and make mention of Allah's name, and tie up your water-skin mentioning Allah's name.