Bhartiyamedia :
The Origin of Onam is popularly associated with the legend of the great King of Kerala Mahabali or Maveli coming to visit his land. The popular myth is that Lord Vishnu took the Vamana incarnation to help Devas (demigods) to get rid of Demon King Mahabali who had become the ruler of the universe. Dwarf Vamana was offered three paces of land during a yagna by King Bali thinking that the little Vamana could not take much land using his foot. But soon Vamana became Narayana and in one step took earth and in another step heaven and there was no more space left to keep the third step.
Mahabali bowed with great humility before Narayana and asked him to place the third step on his head. But before leaving earth Maveli asked for a favor – that he be allowed to visit his beloved people on earth once a year. And this annual visit is Onam, when the land is fresh with new green vegetation, that the great king of Kerala comes to visit his land.
Another belief is that Onam was celebrated during the reign of King Mahabali and it was a popular festival. After King Mahabali departed from earth, people chose this day to remember their ruler.
Onam – Dedicated to Mayon – Sangam Era (2nd Century BC to 7th Century BC)
Mayon, the God of the Mullai region, was worshipped in a grand manner during the Onam festival. The day was observed when the constellation of Thiruvonam falls in the month of Simha, corresponding to the Tamil Month Avani.
The day marks the birthday of Mayon or Vishnu (Maduraikanchi 590 – 591). Thiruvonam is the natal star of Vishnu and it is celebrated not only because it is His birthday but also as it marks the destruction of demons like Bali.
The celebration of Onam in the Pandya capital Madurai is described in Maduraikanchi. It was a happy day when soldiers who were dressed in blue attire enjoyed feasts and drinks. Perhaps Onam was the festival which gave compulsory rest and relief to the warring soldiers.