Abu Musa said that when a house in Medina was burned down during the night over its inhabitants and the Prophet was told, he said, “This fire is just an enemy to you, so when you go to sleep extinguish it.”
Jabir told of hearing God’s messenger say, “When you hear the barking of dogs and the braying of asses at night seek refuge in God from the accursed devil, for they see what you do not see. Do not go out much when there are few people about, for God who is great and glorious scatters abroad such of His creatures as He wishes at night* Shut the doors, making mention of God's name, for the devil does not open a door which has been shut accompanied by mention of God’s name. Cover up jars, invert vessels and tie up buckets.”
He told that when Abu Humaid, one of the Ansar, brought a vessel of milk to the Prophet from an-Naqi'* the Prophet said, “Why did you not cover it up, even by putting a piece of wood on it?”
*A place in the wadi al-'Aqiq where camels which had been given in sadaqa were kept.