The Bhagavata Purana depicts the situation preceding Krishna avatar graphically. Kamsa’s atrocities remain unabated even as he is warned by a celestial voice of his own end at the hands of the eighth child of Devaki, his own sister. Unable to withstand the persecution of Kamsa, Bhudevi and the celestial beings beseech Brahma for alleviation of their suffering. He counsels them to seek refuge in the Lord, who is ever-willing to come to the rescue of the oppressed.
The Lord communicates to Brahma that His incarnation will bring the much-needed succour and that He will be born in the house of Vasudeva with Adisesha preceding Him to be born as elder brother Balarama. During the incarnation, the celestial beings as members of Yadu clan will aid Him in the fight against evil. The Lord designates Yogamaya’s functions at this juncture, explained Akkarakani T. A. Srinidhi Swami in a discourse.
Yogamaya is the Lord’s divine power by which creation is enabled. The Lord assigns her specific tasks, the first to protect the foetus in Devaki’s seventh pregnancy by transferring it to Vasudeva’s wife Rohini living in the land of Yadus out of fear of Kamsa. Next the incarnation of the Lord as Devaki’s eighth child and the birth of Yogamaya herself as the daughter of Yasodha and Nanda are charted out. Accepting the directives readily, the Devi descends to the earth to accomplish her mission. With Adisesha born as Balarama, Krishna and Yogamaya are successfully swapped at birth despite almost insurmountable hurdles — Kamsa’s tight security and vigilance, the torrential rains, the Yamuna in spate, etc — all through the Lord’s inherent power of Maya.
When Kamsa tries to smash his infant niece against a stone slab, Yogamaya escapes from his hold and assumes the form of the eight-handed goddess who has incarnated as the Lord’s sister. She plants seeds of fear in Kamsa when she warns him against killing of helpless infants, revealing that his enemy is born somewhere else. Manifesting herself in different holy places in the world under different names, Yogamaya continues to protect her devotees.