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.
WARNING & DISCLAIMER:
SELECT AND USE OUTDOORS AND SURVIVAL EQUIPMENT, SUPPLIES AND TECHNIQUES AT YOUR OWN RISK. Information posted
on this forum is not reviewed for accuracy and may not be reliable, use at your own risk. Please
review the full WARNING & DISCLAIMER about information on this
site.