Oceans have a higher thermal mass than land areas. This means that they take longer to heat up and cool down. The specific heat capacity of water is about four times greater than that of land, meaning that it takes four times as much energy to raise the temperature of a given mass of water by one degree Celsius as it does to raise the temperature of the same mass of land by one degree Celsius.
In addition, oceans are constantly in motion, which helps to distribute heat.