This is called bradycardia. A whale's body has to be able to withstand enormous pressures when diving. For every 10 m they go down, the pressure increases by 1 bar. Whales can dive and surface rapidly without any risk of the bends or nitrogen narcosis, which are potential problems for human divers. The main reason is that whales and dolphins do not breathe at all when under water, so the amount of nitrogen in the body is minimal.
Human divers use compressed air and constantly absorb extra nitrogen when submerged.