There is. Google for "OTEC". Stands for "Ocean Thermal Energy Conversion". I found several sites that talk about extracting energy from the temperature difference in the water column. One of the side effects is the production of fresh water, both in the way you described, and in more complicated set ups.