The formation of distinct layers with different temperatures, salinity, or oxygen content in the ocean or another body of water. When the water column becomes stratified with a layer of warm, buoyant water at the surface and a layer of colder, denser water below, vertical mixing (upwelling) slows down or stops. The lack of mixing can cause deeper water to become oxygen depleted, while surface waters become nutrient depleted.