When the Messenger of Allah ﷺ did not pray at night because he was prevented from doing so by sleep- meaning, sleep overwhelmed him- or by pain, he would pray twelve rak'ahs during the day. (Using translation from Nasāʾī 1789)
أَنَّ رَسُولَ اللهِ ﷺ كَانَ «إِذَا لَمْ يُصَلِّ مِنَ اللَّيْلِ مَنَعَهُ مِنْ ذَلِكَ نَوْمٌ غَلَبَتْهُ عَيْنَاهُ أَوْ وَجَعٌ صَلَّى مِنَ النَّهَارِ ثِنْتَيْ عَشْرَةَ رَكْعَةً»