“Tonic Immobility (TI) is a reversible coma-like stasis inherent to a variety of terrestrial and aquatic taxa, including elasmobranchs [sharks] yet virtually nothing is known about its underlying neurological and physiological processes in any taxa.”
Source: The stress physiology of extended duration tonic immobility in the juvenile lemon shark, Negaprion brevirostris Journal of Experimental Marine Biology and Ecology Volume 409, Issues 1–2
The prevalence of Tonic Immobility in sharks is so well known that it's routinely used by marine researchers (instead of anaesthetics) for safely immobilising them. The animals are simply upturned (i.e. on their back) for a few tens of seconds and the animal goes flaccid, entering a coma-like state. It can also be induced in some species of shark simply by placing two hands on the animal's snout under the eyes.
Similar states can be induced (by various methods) in a very wide variety of animals, including reptiles, birds and mammals.
It's believed that TI has some relation to the fear response (especially in mammals) - and could have evolved as some form of protection mechanism - i.e. 'playing dead'