From, http://en.wikipedia.org/wiki/Shesha
As per the Mahabharata, Shesha was born to sage Kayapa and his wife Kadru. Kadru gave birth to a thousand snakes, of which Shesha was the eldest. After Shesha, were born Vsuki, Airvata and Takaka, in order. A lot of ea's brothers were cruel in nature and were bent upon inflicting harm on others. They were even unkind to Garuda, who was Kayapa's son through Vinatha, sister of Kadru. (Kadru and Vinatha were daughters of Daksha). ea, disgusted by the cruel acts of his brothers, left his mother and kin, and took to austere penances. He lived on air, and meditated in various places including Gandhamadhana, Badrikshrama, Gokarna, Pushkara and Himalayas. His penances were so severe that his flesh, skin and muscles dried up and merged with his frame. Brahm, convinced of his ea's will, asked ea 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. Brahm gladly accepted the request. Brahma then asked a favour of ea, that of to go beneath the unstable earth and stabilize it. ea agreed and went to the netherworld, and stabilized her with his hood. He is known to support her even today, thus making Ptala his perennial residence. (Mbh, di Parva)
Maha Vishnu and Maha Lakshmi
Shesha is also depicted as floating in the ocean of the changing world, forming the bed of Maha Vishnu. Since he is also known as Adishesha (the foremost of snakes)and because he is Anantashesha or simply Ananta (endless, as he is known to remain in existence even after the end of the Kalpa, when the whole universe is destroyed). (Om Namo Bhagavate Vasudevaya)