In the case of whales, I always thought that it was something to do with the fact that they rely upon buoyancy to support their weight and this seems to support that view:
> When whales, including small whales or dolphins become stranded on beaches they suffer from the pressure of their own weight on their organs,in the water they are weightless. They also suffer from overheating as they have blubber that insulates them in the water and outside of the water causing them to overheat. This is why we place wet towels and cold water on their fins and flukes when do they strand to help keep their body temperature down. Unfortunately most stranded whales do not survive once they have beached themselves.