The King of the Moon
That hero Sudyumna, accompanied by a few ministers and associates and riding on a horse brought from Sindhupradeśa, once went into the forest to hunt. He wore armor and was decorated with bows and arrows, and he was very beautiful. While following the animals and killing them, he reached the northern part of the forest.
There in the north, at the bottom of Mount Meru, is a forest known as Sukumāra where Lord Śiva always enjoys with Umā. Sudyumna entered that forest.
O King Parīkṣit, as soon as Sudyumna, who was expert in subduing enemies, entered the forest, he saw himself transformed into a female and his horse transformed into a mare.
When his followers also saw their identities transformed and their sex reversed, they were all very morose and just looked at one another.
Mahārāja Parīkṣit said: O most powerful brāhmaṇa, why was this place so empowered, and who made it so powerful? Kindly answer this question, for I am very eager to hear about this.
Śukadeva Gosvāmī answered: Great saintly persons who strictly observed the spiritual rules and regulations and whose own effulgence dissipated all the darkness of all directions once came to see Lord Śiva in that forest.
When the goddess Ambikā saw the great saintly persons, she was very much ashamed because at that time she was naked. She immediately got up from the lap of her husband and tried to cover her breast.
Seeing Lord Śiva and Pārvatī engaged in sexual affairs, all the great saintly persons immediately desisted from going further and departed for the āśrama of Nara-Nārāyaṇa.
Thereupon, just to please his wife, Lord Śiva said, “Any male entering this place shall immediately become a female!”
Since that time, no male had entered that forest. But now King Sudyumna, having been transformed into a female, began to walk with his associates from one forest to another.
Sudyumna had been transformed into the best of beautiful women who excite sexual desire and was surrounded by other women. Upon seeing this beautiful woman loitering near his āśrama, Budha, the son of the moon, immediately desired to enjoy her.
The beautiful woman also desired to accept Budha, the son of the king of the moon, as her husband
Srimad Bhagavatam, Canto 9