svetz
Works in theory! Practice? That's something else
In most bodies of water the warmer water is less dense and rises to the top, so the top few inches are warm and cold beneath that. You've probably experienced this while skinny dipping in the lake.
But, a curious thing happens when the water gets really really really salty. The warmer water falls to the bottom. That's the basis of a solar pond, the heat gets trapped and accumulates at the bottom of the pond.
The largest operating solar pond for electricity generation was the Beit HaArava pond built in Israel and operated up until 1988. It had an area of 210,000 m² and gave an electrical output of 5 MW. (ref)
But, a curious thing happens when the water gets really really really salty. The warmer water falls to the bottom. That's the basis of a solar pond, the heat gets trapped and accumulates at the bottom of the pond.