Water absorbs heat during the day and loses it very slowly at night. I think this is why some snakes will do that. The water can be warmer than the surrounding air at night.