Sahih Muslim 1743
The Book of Prayer - Travellers
حَدَّثَنَا سَعِيدُ بْنُ مَنْصُورٍ، وَقُتَيْبَةُ بْنُ سَعِيدٍ، جَمِيعًا عَنْ أَبِي عَوَانَةَ، قَالَ سَعِيدٌ حَدَّثَنَا أَبُو عَوَانَةَ، عَنْ قَتَادَةَ، عَنْ زُرَارَةَ بْنِ أَوْفَى، عَنْ سَعْدِ بْنِ هِشَامٍ، عَنْ عَائِشَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم كَانَ إِذَا فَاتَتْهُ الصَّلاَةُ مِنَ اللَّيْلِ مِنْ وَجَعٍ أَوْ غَيْرِهِ صَلَّى مِنَ النَّهَارِ ثِنْتَىْ عَشْرَةَ رَكْعَةً .
A'isha reported that when the Messenger of Allah (ﷺ) missed the night prayer due to pain or any other reason, he observed twelve rak'ahs during the daytime
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.