A man came to Messenger of Allah ﷺ and said, "O Messenger of Allah ﷺ! I am suffering from fatigue and hunger." The Prophet ﷺ sent (somebody) to his wives (to get something), but the messenger found nothing with them. Then Messenger of Allah ﷺ said (to his companions). "Isn't there anybody who can entertain this man tonight so that Allah may be merciful to him?" An Ansari man got up and said, "I (will, entertain him), O Messenger of Allah ﷺ!" So he went to his wife and said to her, "This is the guest of Messenger of Allah ﷺ, so do not keep anything away from him." She said. "By Allah, I have nothing but the children's food." He said, "When the children ask for their dinner, put them to bed and put out the light; we shall not take our meals tonight," She did so. In the morning the Ansari man went to Messenger of Allah ﷺ who said, "Allah was pleased with (or He bestowed His Mercy) on so-and-so and his wife (because of their good deed)." Then Allah revealed: 'But give them preference over themselves even though they were in need of that.' (59.9) (Using translation from Bukhārī 4889)
أَتَى رَجُلٌ رَسُولَ اللَّهِ ﷺ فَقَالَ يَا رَسُولَ اللَّهِ أَصَابَنِي الْجَهْدُ فَأَرْسَلَ إِلَى نِسَائِهِ فَلَمْ يَجِدْ عِنْدَهُنَّ شَيْئًا فَقَالَ رَسُولُ اللَّهِ ﷺ «أَلَا رَجُلٌ يُضِيفُ هَذَا اللَّيْلَةَ يَرْحَمُهُ اللَّهُ» فَقَامَ رَجُلٌ مِنَ الْأَنْصَارِ فَقَالَ أَنَا يَا رَسُولَ اللَّهِ فَذَهَبَ إِلَى أَهْلِهِ فَقَالَ لِامْرَأَتِهِ ضَيْفُ رَسُولِ اللَّهِ ﷺ لَا نَدَّخِرُ مِنْهُ شَيْئًا قَالَتْ وَاللَّهِ مَا عِنْدِي إِلَّا قُوتُ الصِّبْيَةِ قَالَ فَإِذَا أَرَادَ الصِّبْيَةُ الْعَشَاءِ فَنَوِّمِيهِمْ وَتَعَالَيْ فَأَطْفِئِي السِّرَاجَ وَنَطْوِي بُطُونَنَا اللَّيْلَةَ فَفَعَلَتْ ثُمَّ غَدَا الرَّجُلُ عَلَى رَسُولِ اللَّهِ ﷺ فَقَالَ رَسُولُ اللَّهِ ﷺ لَقَدْ عَجِبَ اللَّهُ أَيْ لَقَدْ ضَحِكَ اللَّهُ ﷻ مِنْ فُلَانٍ وَفُلَانَةَ وَأَنْزَلَ اللَّهُ تَعَالَى {وَيُؤْثِرُونَ عَلَى أَنْفُسِهِمْ وَلَوْ كَانَ بِهِمْ خَصَاصَةٌ} [الحشر 9]