Yes, there are the temperature effects to which THECORBYLOON refers. But there could be more factors involved.
Are you talking abot tap water or bottled water? Tap water has been under pressure so any air will have been forced into solution. Carbon dioxide is the most soluble (but least common in the air). Oxygen in the next most soluble and then Nitrogen last. Once it comes out of the tap, its dissolved gas will start to be released and if it is slow, it will form as small bubbles around the glass. Occasionally in summer when there is a large temperature difference as well as a large pressure difference, the gas may come out of solution much faster and cause the tapwater to appear milky in the glass. You gan prove this is gas (and not sediment) because the glass clears first from the bottom as the minute bubbles rise to the top.