Long ago, when the whole universe was filled with a great ocean, Lord Vishnu was sleeping on his bed of Adisesha, floating in the middle of the ocean. From his ear wax, two Asuras named Madhu (मधु) and Kaitabha (कैटभ) were formed. They fed on the ocean-water and grew strong.
The twins began to wonder, “What is this happy place, where we have been born? What is the name of this boundless ocean that nourishes us? How were we created? Who are our parents? How come we have absolutely no knowledge about any of these things?”. The began to wander here and there in search of answers.
While they were wandering thus, they heard the sound of Mantras (incantations), coming from high above them. When they looked up, a streak of lightning was also seen, that illuminated the boundless sky above. The two Asuras said, “There is no doubt that this glorious sound that we heard must be an incantation. The lightning also appears to be worthy of worship. Let us pray to the force above us, by chanting the Mantras again and again.”
They began meditating upon the glorious force above. They did not eat or drink but were constantly chanting the Mantra that they had heard before. Their penance lasted a thousand years. Devi (Shakti) appeared before them and said, “I am very much pleased with your worship. Ask me what you will and I shall grant you that boon.”
The two asuras then said, “Let us die only at a time of our choosing. Let us not die otherwise.”
Devi said, “So be it. You will be practically immortal. Your strength shall also increase thousand fold. Till you decide of your own free will to die, you shall live. The Devas nor any other Asuras shall not be able to defeat you.”
Madhu and Kaitabha became arrogant with a sense of their own importance. The roamed here and there on the ocean, sporting with the various water-based animals. While wandering in this fashion, they came upon Lord Brahma, who was doing his task of creation, sitting on a seat made from a lotus.
When they saw him, the two Asuras became desirous of conquest. The said to him, “O Divine being, why are you sitting on a high seat that is meant only for the brave, the victorious. Either get down and acknowledge us as your overlords or prove your mettle in combat. Make your decision soon.”
Lord Brahma knew that he was no match for these warriors, who had been strengthened by a boon from the primeval Devi. He thought to himself, “Only Vishnu can save me from this calamity. Unfortunately that Janardhana is deep in sleep. I must first wake him from his slumber.”
He fled to the abode of the Lord and started praying to Lord Vishnu. He said, “O protector of the universe! The savior of the oppressed! One who dispels the grief of devotees! You are omniscient and omnipresent. O Jagannatha! Here are two Asuras created from your ear wax. Strengthened by a boon from Devi, they are attacking me. Are you not aware of my predicament? Do you not know that I am no match for these asuras created from your dirt? If you do not save me, you will deviate from the duty appointed to you. Please save me from these creatures of ill-omen!”
Despite these pleas, Vishnu was still asleep. Lord Brahma then said, “If Vishnu is not waking up, it must be the work of Nitra-Devi (the Goddess of sleep). I must first placate the supreme Goddess so that Vishnu would awake and save me”
He started praying to Devi by saying, “O Devi, it is by your will that Vishnu has fallen under the influence of Maya (loosely translated as an illusion, but here it is referring to his deep sleep, unconscious of the distress which Brahma is in). Devi, you are my sole hope. Let Vishnu arise from this slumber.”
He further praised her by chanting, “Devi. The Vedas and the Mantras are unanimous that you are the creator of this universe. It is by your power that Vishnu, the best among men (Purushottama) has fallen under the influence of sleep. Devi, only you can liberate him from the clutches of that Goddess. Either wake him up or destroy these Asuras with your own power. Please save me.”
By the grace of Devi, Vishnu awoke. Yawning widely, he opened his eyes and saw Lord Brahma in a posture of supplication, quaking before him with terror.
“O Lord who was born from a lotus, what has caused you to come here in such a fashion? Why have you interrupted your task of creation to visit me? You appear to be in mortal fear of something. What has caused this terror in your heart?” asked Vishnu.
Lord Brahma replied, “O Lord of the universe, two Asuras who were born from your ear wax, are threatening me. They have obtained a powerful boon from Devi and are absolutely drunk with power. They have challenged me to battle. I cannot fight them. Nor can I accept them as my overlords. As the protector of the universe, it is your duty to save me from these marauders.”
Vishnu smiled and said, “Leave your worry. It appears that the lifespan of these fools has come to an end. Impelled by their fate, they have taken leave of their senses. I shall slay them and rid the world of their menace.”
While these exchanges were transpiring in Vaikunta, Madhu and Kaitabha, who were looking for Brahma came there. Beholding him there, they said, “Why have you run away to this place? Are you trying to save your life by seeking asylum from this person? Fight us, and we shall send you to the abode of Yama even as your would-be savior looks on helpless! After that, we shall take care of this charlatan who is reposing on a serpent!”
Vishnu interrupted them and said, “Forget him. If you two have faith in your own strength, fight me. I shall soon humble your pride by defeat and slay you.”
The battle began. It was a wrestling match to behold. When Madhu got tired, Kaitabha would engage Janardhana in battle. This great battle stretched for five thousand years. Vishnu was surprised at his inability to destroy these asuras. He then divided that these two Asuras have obtained the boon of invincibility from Devi. While he was still battling them, he started to pray to Devi, to show a way to slay these Asuras.
Devi appeared in the heavens above the battleground. Fighting with two hands, Vishnu joined his other two hands in worship for the eternal Goddess. He beseeched her to show a way to overcome these Asuras, who have become strong as a consequence of Devi’s boon.
Devi said, “O Narayana, I have heard your prayer. Continue this battle. These Asuras must be overcome by trickery. An illusion is a right weapon to use against these warriors. I shall cast my evil eye on them, depriving them of reason. It will be easy for you to kill them then.”
True to her word, she cast a look mixed with false-affection, on the two asuras, causing their baser instincts to awaken. The Asuras fell under the spell of Devi.
As Vishnu perceived that the concentration of his foes was wavering, he addressed them in a loud voice and said, “I have been very much pleased by the skill that you two have displayed. Till date, I have not come across a single person who could stand up to me in concept. In recognition of your bravery, I shall grant you a boon. Ask, and it shall be yours.”
Completely befuddled by Devi’s gaze, the Asuras laughed outright at this proposal. In a tone of derision, they said, “We are winning this battle. It is for the victors to grant a boon to the vanquished. We are more powerful than you. What boon can you grant us? Instead, we shall grant you a boon. Ask, and it shall be yours.”
This was the opening that Vishnu was waiting for. He said, “The boon that I seek is that you two should die now at my hands.”
Too late, the Asuras perceived that they had been tricked. However, there was nothing to be done now. They had promised to grant a boon and were bound by their promise. The just had one stipulation to make. They did not want to die on water.
Vishnu said, “So be it!”. He then took up his Vishwa-Roopa (A boundless form, immeasurably immense). He then placed the two Asuras on his massive thighs and beheaded them with his Sudarshana-Chakra (discus). From the body fat of the dead asuras, the land was formed. Since it was formed from an unclean source, the soil is not fit for consumption.
This story is from Devi Bhagavata Purana 6.1-9.85 – Source