It was narrated from Anas bin Malik that the Prophet (ﷺ) was given glad tidings that a need of his had been met, and he fell down prostrate.
حَدَّثَنَا يَحْيَى بْنُ عُثْمَانَ بْنِ صَالِحٍ الْمِصْرِيُّ، أَنْبَأَنَا أَبِي، أَنْبَأَنَا ابْنُ لَهِيعَةَ، عَنْ يَزِيدَ بْنِ أَبِي حَبِيبٍ، عَنْ عَمْرِو بْنِ الْوَلِيدِ بْنِ عَبْدَةَ السَّهْمِيِّ، عَنْ أَنَسِ بْنِ مَالِكٍ، أَنَّ النَّبِيَّ ـ صلى الله عليه وسلم ـ بُشِّرَ بِحَاجَةٍ فَخَرَّ سَاجِدًا .
IbnMaja
Establishing the Prayer and the Sunnah Regarding Them • Hadith 1392