Matthew 25:40
34 Then the king will say to those on his right, ‘Come, you who are blessed by my Father, inherit the kingdom prepared for you from the foundation of the world. 35 For I was hungry and you gave me food, I was thirsty and you gave me something to drink, I was a stranger and you invited me in, 36 I was naked and you gave me clothing, I was sick and you took care of me, I was in prison and you visited me.’ 37 Then the righteous will answer him, ‘Lord, when did we see you hungry and feed you, or thirsty and give you something to drink? 38 When did we see you a stranger and invite you in, or naked and clothe you? 39 When did we see you sick or in prison and visit you?’ 40 And the king will answer them, ‘I tell you the truth, just as you did it for one of the least of these brothers or sisters of mine, you did it for me.’
Midrash Tannaim 15:9
Midrash'Sufficient' - If one encounters a poor person, one is obligated to fulfill that person's needs, as it says: 'sufficient.' If the giver doesn't have enough, they should give according to their ability. How much? Up to one-fifth of one's property, the choicest form of the commandment; one-tenth of one's property, average; less than that, selfish. Thus: God says to Israel, 'My Sons, whenever you give sustenance to the poor, I impute it as though you gave sustenance to me, for it says, My Bread.' Does then, God eat and drink? No, but whenever you give food to the poor, God accounts it to you as if you gave food to Him.
Notes and References
"... The complete annual cycle of sacrifices is set out in Numbers 28, and the system is elaborated with full details. The Haggadah is correspondingly rich, and many ethical ideas are extracted. The section begins: 'Command the children of Israel. . . my bread for my sacrifices ... shall you observe to offer unto me' (Numbers 28:2). The pronoun 'my' is stressed and from these words many lessons are drawn. It is taught that God has no need for sacrifices: examples have been cited from numerous sources. These mostly repeat each other; in other places, new ideas may be seen. For example, God says to Israel, 'My sons, whenever you give sustenance to the poor, I impute it as though you gave sustenance to me, for it says, 'My bread.' Does, then, God eat and drink? No, but whenever you give food to the poor, God accounts it to you as if you gave food to Him.' This idea is a slight development of the previous passages, cited from Midrash Tanchuma, and Moore aptly compares it to Matthew 25:40. A similar comment is found on Psalm 50:8, 'Not for thy sacrifices do I reprove thee.' Rabbi Nachman, in the name of Rabbi Berechiah, said: 'If a man intends to give alms, God inscribes it as opposite to Him, for the verse continues, 'and thy oblations are opposite to me always.' ..."
Montefiore, C. G. A Rabbinic Anthology (p. 414) Cambridge University Press, 2012