It was narrated from 'Aishah that if the Messenger of Allah ﷺ wanted to sleep while he was Junub, he would perform Wudu', and if he wanted to eat he would wash his hands.
أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ إِذَا أَرَادَ أَنْ يَنَامَ وَهُوَ جُنُبٌ تَوَضَّأَ وَإِذَا أَرَادَ أَنْ يَأْكُلَ غَسَلَ يَدَيْهِ