The necessary temperature differential to create a heat engine would be an engineering nightmare for something the size of the ocean.
Work Step by Step
A heat engine needs to operate between 2 different temperatures. One could exploit the temperature difference between surface water and very deep water, but there would be expensive engineering problems to be solved in building a heat engine that is potentially hundreds of feet high. Moreover, the efficiency would not be very high because the temperature difference between hot and cold reservoirs wouldn’t be that great, and maintaining such an engine in difficult conditions might not be cost-effective. There is a larger temperature difference between, say, tropical seas and cold-weather seas. But even larger distances, engines, and headaches are involved.