As the Skanda Purana tells it
Skanda Purana, Karttikamasa Mahatmya 9 · 3 min read
King Bali had lost the earth. A dwarf had come to his sacrifice and asked for it, and Bali, who never refused a guest, had given it. The dwarf was Hari, and the earth went back to Indra and the gods. Bali went down to Patala, the world beneath, to be its king instead.
He had kept his word to the last step. Hari was pleased with him, and said so.
"Welfare to you, Bali. Choose a boon. Whatever is in your mind."
Bali did not ask for the earth back. He asked for three days of it.
"Give me three days every year when the earth is my kingdom again. The fourteenth of the dark fortnight, the new moon, and the first day after it."
"And in those days?"
"In those days, let your wife stay. Let Lakshmi live for good in the house of anyone who lights lamps in my kingdom."
"And the houses that stay dark?"
"Let her shadow fall on them," said Bali. "The darkness that follows her, let it stay in the house that has no light."
Hari gave him all of it. So for three nights every year the earth is the kingdom of Bali, and those are the nights of the lamps.
The Purana tells another thing about the new moon. On that day, it says, the gods were set free from Bali's prison, and Lakshmi was set free with them. They were worn out. They went to the Ocean of Milk and lay down and slept for a long time, and Lakshmi, safe at last from the Daityas, curled up inside a lotus and slept soundly.
The Daityas were afraid of Vishnu now. They came to the Ocean of Milk quietly, under the protection of brahmins, and found Lakshmi asleep in her flower. They did not try to take her. They stood at the edge of the water and praised her.
"You are the splendour in the sun and in the moon. You are the splendour in fire, in lightning, in gold, in the stars. You are the light of every light. We bow to you, goddess, who live in the flame of the lamp."
That is why, the Purana says, a bed is made for Lakshmi on this night, with soft cotton and white sheets like the foam of milk, and she is worshipped in a pavilion hung with cloth and flowers. Sweets of milk boiled with nutmeg, cloves, cardamom and camphor are made for her. And before Hari wakes from his long sleep, the women of the house wake Lakshmi, so that she will not leave that house for a whole year.
The king has his part. He lights the whole city, feeds every hungry person, puts on new clothes, and calls out to his people.
"Today is the kingdom of Bali. Enjoy yourselves as you please. Children, go and play."
He gives the children toys. At midnight he walks the streets on foot to see the lamps. And after midnight, when the city is half asleep, its women come out into their courtyards with winnowing baskets and little drums, and beat them, and drive Alakshmi, the goddess of bad luck, out of their houses.
As the Padma Purana tells it: Shiva answers his son
Padma Purana, Uttara Khanda 122 · 1 min read
In the Padma Purana the question comes from Kartikeya.
"Father, tell me about Dipavali. Why is it kept? Which god rules it? What should be given, and what kind of play is right?"
Shiva smiled at him and gave him the festival night by night. On the thirteenth, a lamp for Yama outside the house. On the fourteenth, a bath before dawn, because Lakshmi lives in the oil and Ganga in the water. Then lamps everywhere: in the shrines of the gods, at the rivers, on the ramparts and in the gardens, in the gateways and the cowsheds and the elephant stalls. Lakshmi must be woken by women before Hari wakes.
Then Shiva told his son something about himself.
"Shankara and Bhavani once sat down to play dice," he said, "and Lakshmi stood by in the form of a cow. Gauri won. Shambhu lost everything and was sent away with nothing on. So Shankara goes unhappy, and Gauri is happy always." Whoever wins the first throw on this night, he added, will be happy all year.
After midnight the women drive Alakshmi out of the courtyard with trumpets and kettledrums. In the morning Govardhan is worshipped, and the cows are dressed up and given the day off: no loads, no milking.
On that night Bali is drawn on the ground in five colours, crowned and smiling, with the Vindhya mountains behind him, and worshipped in the middle of the house.
"King Bali, son of Virochana, Indra that is to be, accept this worship."
Vishnu himself, Shiva said, granted Bali this festival. It is called the Kaumudi, because ku is the earth and mud is delight, and on this night the whole earth is glad.