As you will see, whales -and other sea creatures that live in the surface of the water as well as they can descend down to crazy depths- can also get the diver's sickness.
The diver's sickness is a situation where nitrogen bubbles appear in the blood vessels, the organs and the bones of a diver. Here is how it happens: First of all, we're talking about divers who use compressed air tanks to dive for long time. Every 10 meters the diver descends, the pressure is increased by about 1 atm. Under high pressure, the nitrogen in the air (which is about 78%) becomes more soluble, and higher amounts of nitrogen enters the diver's organism.
As long as the pressure is increased or kept stable, there is no side effect. But if the pressure is decreased, the nitrogen becomes less soluble. In other words, it becomes an air bubble. This process will happen when the diver ascents back to surface. The organism will try to take out the extra nitrogen bubbles but it can only happen in small amounts over time. This is why divers are advised to ascent slowly, only a few meters per minute, only to allow the organism to compensate the pressure decrement. But if the diver ascents fast, then bubbles will appear in his blood vessels or bones or organs and they will cause severe problems and maybe death.
So far this is plain physics - Decompressing compressed air rapidly will cause air bubbles, like when you open a soda can. So, sea creatures such as whales cannot cheat physics. So, how can they dive at high depths and then ascent back to surface?
Well, first of all, medium depth diving whales follow the same technique that apnea divers use: They take a LARGE breath before they descent. This way, the amount of nitrogen is not that much to cause a problem when they ascent back to surface.
Some whales can dive down to 2 kilometers! To achieve this, the whales follow another technique which divers call over-oxidation. They take many deep breaths before they descent and store huge amounts of pure oxygen in their special oxygen blood muscles. Then they empty their lungs and dive! During ascent, they do it in a slow rate (like divers do) and take many breaks to their way up.
Nevertheless, there has been found remains of nitrogen into their bones and organs. This proves that they also get the diver's sickness, but why? Watch the following video which gives a possible explanation...