Being ordered by the Supreme Personality of Godhead, Vasudeva attempted to take his son from the delivery room, and exactly at that time, a daughter was born of Nanda and Yasoda. She was Yogamaya, the internal potency of the Lord. By the influence of this internal potency, Yogamaya, all the residents of Kamsa's palace, especially the doorkeepers, were overwhelmed with deep sleep, and all the palace doors opened, although they were barred and shackled with iron chains. The night was very dark, but as soon as Vasudeva took Krsna on his lap and went out, he could see everything just as in the sunlight.
In the Caitanya-caritamrta it is said that Krsna is just like sunlight, and wherever there is Krsna, the illusory energy, which is compared to darkness, cannot remain. When Vasudeva was carrying Krsna, the darkness of the night disappeared. All the prison doors automatically opened. At the same time there was a thunder in the sky and severe rainfall. While Vasudeva was carrying his son Krsna in the falling rain, Lord Sesa in the shape of a serpent spread His hood over the head of Vasudeva so that he would not be hampered by the rainfall. Vasudeva came onto the bank of the Yamuna and saw that the water of the Yamuna was roaring with waves and that the whole span was full of foam. Still, in that furious feature, the river gave passage to Vasudeva to cross, just as the great Indian Ocean gave a path to Lord Rama when He was bridging over the gulf. In this way Vasudeva crossed the river Yamuna. On the other side, he went to the place of Nanda Maharaja situated in Gokula, where he saw that all the cowherd men were fast asleep. He took the opportunity of silently entering into the house of Yasoda, and without difficulty he replaced his son, taking away the baby girl newly born in the house of Yasoda. Then, after entering the house very silently and exchanging the boy with the girl, he again returned to the prison of Kamsa and silently put the girl on the lap of Devaki. He again clamped the shackles on himself so that Kamsa could not recognize that so many things had happened. \