As per the Legends, In Tretayuga, a demon Madvasura an ardent devotee of Hanuman used to work in the court of Ravana. During Rama-Ravana war, Madvasura unwilling to fight against Hanuman and left the body. He took birth as Madvakudu in Dwaparayuga and used to work with Kauravas. On seeing Hanuman flag on top of Arjuna's Chariot in the final battle, he left the war zone. He again took birth in Kaliyuga as Madhvudu and started living on the banks of Yerrakaluva. Daily after taking a bath in Yerrakaluva he used to perform Hanuman Japam in his Ashram. Locals used to treat him as a Sage and called him by Maharshi Madhva. Out of his old age, he is not able to walk properly. One day, while going to the river bank to take the bath he was about to fell into the river, then a monkey held his hand and brought him to the back to the Ashram and served him a fruit.
Daily monkey used to hold him during bath and serve him with fruits. Sage without realising this used to continue with his Japam. One day, Sage looked at himself and thought how he was able to manage all his need with this aged body. With his Spiritual powers, he came to know that the monkey is none other than Lord Hanuman and pleaded the Lord for his ignorance. Anjaneya Swamy appeared in his actual form and told him that he was happy in serving his devotee. Anjaneya Swamy also granted a boon of Sage's wish. Sage expressed his desire to be with Swamy all the time. On his request Anjaneya Swamy self-manifested here with a fruit in one hand and Club (Gadha) in other and Sage to take the shape of a Maddi Tree.