Sayyiduna Abu Hurairah (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) commanded us to cover water, to tie the mouth of the water-skin, and to turn vessels upside down.
Brief Explanation
(Commentary on Hadiths 2167 to 2169)
From these hadiths, the ruling is understood regarding covering water vessels, tying the mouth of the water-skin, and placing vessels upside down. There are many benefits in this: protection from dust, insects and bugs, as well as from heavenly calamities and afflictions.
In one hadith it is mentioned: keep the doors closed, extinguish the lamps, because Shaytan neither opens a closed door nor uncovers a covered vessel. And if nothing is found to cover it, then, taking the name of Allah, place a piece of wood across it. All these are Islamic etiquettes which are a source of goodness and blessing.