Sayyiduna Miqdad bin Amr (may Allah be pleased with him) said: I and two companions of mine came to Madinah, and we began presenting our condition to people, but no one took us in as guests. So we came to the Prophet (peace and blessings be upon him) and said: O Messenger of Allah! We are suffering severe hunger; we presented our condition to people, but no one took us in as guests. So he (peace and blessings be upon him) took us to his home, where there were four goats. He (peace and blessings be upon him) said: "O Miqdad, milk them." And the Prophet (peace and blessings be upon him) allotted a share to each one of us. I kept doing that. I set aside the share of the Messenger of Allah (peace and blessings be upon him), but he (peace and blessings be upon him) was late in coming, so I lay down on my bed. My self said to me: The Messenger of Allah (peace and blessings be upon him) must have gone to some household of the Ansar and eaten and drunk there, so why not drink this cup? My self kept urging me until I drank it. When it settled in my stomach, worries old and new (of every kind) overcame me. My self said to me: Now he (peace and blessings be upon him) will come thirsty and find nothing. So I lay down and covered myself with a cloth. Then the Messenger of Allah (peace and blessings be upon him) came and gave a greeting of salam that would be heard by one awake and would not wake one asleep. Then he (peace and blessings be upon him) came to the vessel, uncovered it, and found nothing. He (peace and blessings be upon him) said: "O Allah, feed the one who fed me, and give drink to the one who gave me drink." I seized upon this supplication of his as an opportunity, got up, took the knife and went to the goats, looking to see which of them was the fattest so that I could slaughter it. I went near one and felt that its udder was full. I looked at another, and it too was full. I looked at a third, and it too was full. I looked at all of them, and all their udders were full. So I took the vessel and milked into it, then said: Please drink. He (peace and blessings be upon him) said: "O Miqdad, first tell me the news." I said: Drink first, then I will tell you the news. He (peace and blessings be upon him) said: "O Miqdad, one of your misdeeds." Then he (peace and blessings be upon him) drank, and then said: "Drink." I said: You drink, O Messenger of Allah! So he (peace and blessings be upon him) drank until he (peace and blessings be upon him) was full. Then I drank after the Messenger of Allah (peace and blessings be upon him), and then I told him (peace and blessings be upon him) the whole story. The Messenger of Allah (peace and blessings be upon him) said: "This is a blessing that has come down from the sky. Why did you not tell me earlier, so that I could have given your two companions a drink as well?" I said: Once you and I have drunk, I do not care whom it has missed.
Hadith Referenceالمعجم الكبير للطبراني / باب الميم / 17706
A similar hadith is also narrated from Sayyiduna Miqdad (may Allah be pleased with him). He said: I and two companions of mine - when the severity of hunger had taken away our hearing and our sight - came to the Messenger of Allah (peace and blessings be upon him). He (peace and blessings be upon him) went to his household, and there were goats there. He (peace and blessings be upon him) said: "Set things right (milk them)," and then he narrated a similar hadith.
Hadith Referenceالمعجم الكبير للطبراني / باب الميم / 17707