text: Origin and legends According to the Mahabharata, Shesha was born to the sage Kashyapa and his wife Kadru. Kadru gave birth to a thousand snakes, of which Shesha was the eldest. After Shesha, Vasuki, Iravati and Takshaka were born, in that order. A lot of Shesha's brothers were cruel and were bent upon inflicting harm on others. They were even unkind to Garuda, who was Kashyapa's son through Vinata, sister of Kadru. (Kadru and Vinata were daughters of Daksha).
  Shesha, disgusted by the cruel acts of his brothers, left his mother and kin, and took on austere penances. He lived on air and meditated in places including Gandhamadhana, Badrikashrama, Gokarna, Pushkara, and the Himalayas. His penances were so severe that his flesh, skin, and muscles dried up and merged with his frame. Brahma, convinced of Shesha's will, asked Shesha to request a boon. Shesha asked that he be able to keep his mind under control so that he could continue to perform ascetic penances. Brahma gladly accepted the request. Brahma then asked a favour of Shesha: to go beneath the precarious earth and stabilise it. Shesha agreed and went to the netherworld and stabilised Bhumi with his hood. He is believed to support her even today, thus making Patala his perennial residence.
  Vishnu and Shesha
  Shesha is usually depicted as floating in the ocean of the changing world, forming the bed of a primordial form of Vishnu, i.e. Narayana, Vāsudeva or in later Puranic Vaishnavism, Mahavishnu.