As per Hindu legend, the king Ubhamanyu earned the wrath of sage Durvasar and lost all his physical strength. To get rid of the curse, he was asked to feed one lakh people everyday. One day, Hindu god Vishnu disguised himself as an old man, appeared before the king and asked for a meal. The king went on donating and the old man consumed all the food prepared for the people. The king was shocked and bewildered at this strange act. The old man asked for a kudam (pot) of Neyyaappam (a sweatmeal), stating that only it can fulfill his hunger. The king fulfilled the wish and later realised that it was Vishnu who had appeared as the old man. The king was relieved of the sage's curse by the blessings of Vishnu. Because of the legend, Vishnu is called Appakkudathaan in the temple.