I asked the Messenger of Allah ﷺ what one of us should do if he becomes junub then wants to sleep before doing ghusl. The Messenger of Allah ﷺ said: “Let him do wudoo' as for prayer, then he may go to sleep.ʿ
سَأَلْتُ رَسُولَ اللهِ ﷺ كَيْفَ يَصْنَعُ أَحَدُنَا إِذَا هُوَ أَجْنَبَ ثُمَّ أَرَادَ أَنْ يَنَامَ قَبْلَ أَنْ يَغْتَسِلَ؟ قَالَ فَقَالَ رَسُولُ اللهِ ﷺ لِيَتَوَضَّأْ وُضُوءَهُ لِلصَّلاةِ ثُمَّ لِيَنَمْ