It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that the Muhajirun said: "O Messenger of Allah! The Ansar have taken all the reward. We have never seen a people who give so generously from much, nor who share so well from little, as they do. They have spared us the toil (of farming and the like) and made us partners in the ease and benefit." So the Prophet (peace and blessings be upon him) said: "Do you not praise them and pray (to Allah) for them?" They said: "Yes indeed (we do)." He (peace and blessings be upon him) said: "Then this (deed of yours) is in return for that (kindness of theirs)."
This narration is also reported through Humayd (may Allah have mercy on him) from Sayyiduna Anas (may Allah be pleased with him).