Sage Markandeya was the son of Sage Bhrigu and Shiva had rescued him from the clutches of death at the age of 16. Shiva also gave Sage Markandeya the boon that he will always remain as a 16 year old. After this the sage performed intense meditation and acquired new knowledge of the universe. The story of Sage Markandeya and Yoga Nidra of Vishnu is part of the Sage’s attempt to gather new knowledge.
Sage Markandeya performed deep meditation for years. He was unaware of the changes that were happening around him. He remained unaware of the change of time. Eons passed by.
Then one day there was huge torrential rain and rivers overflowed, sea swallowed the land. Land was not to be seen. Everything was submerged in the great ocean.
Sage Markandeya was thrown around in the huge waves created by the ocean. The huge waves woke him up from his meditation. He was tossed around for long time.
Then the sage saw brilliant light appearing from the distance. He moved towards the light. As he reached near the light, he realized that it came from a shining infant that was lying on its back on a banyan tree leaf and sucking on its big toes.
Suddenly Sage Markandeya was sucked into the body of the infant.
In the body of the infant the sage saw millions of galaxies. He saw birth and death of suns. He saw new galaxies appearing and some disappearing. As he watched eons passed in fast succession. He saw Mother Earth – he saw oceans, plants, mountains, living beings and all that he had heard and many more that were beyond his knowledge.
Then suddenly the Sage was thrown out of the body of the infant.
The Sage then realized that what he was witnessing was the Mahapralaya. A Mahayuga had ended.
Bhagavan Vishnu, the sustainer of the universe, inhales and this results in end of the creation at the end of each Mahayuga. In this state, the universe and earth and time remain static in the infant body of the Vishnu. Then when He exhales the next cycle of creation begins on earth.