It is an old habit among most of the people. Since the time when we were young and we were taught that we should be drink a glass of water right after we wake up. Do you have that habit to drink the glass of water from your nightstand? If you try it I am sure that you have noticed that the water have strange taste and different. Opposite of the food, the regular water does not contain sugars and proteins which ca be easily targeted by microbes and to come to pollution. Still there is no explanation from which comes the strange taste in the water that stood on the nightstand over the night by your bed.
A large amount of dust and bacteria can be gathered in that glass of water. When water is exposed to air it absorbs carbon dioxide and a small part of that CO2 is converted into carbonic acid, which means that water exposed to the air changes its chemical composition. When carbon acid releases one or two protons and is turned into carbonate or bicarbonate, it lowers the pH of water and thus change its taste.
This does not mean that the water is bad but certainly have changed the taste after standing all night in the nightstand and gathering bacteria and dust from the air. I am sure you will think twice should you or should not to drink it.