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. (Using translation from Nasāʾī 256)
أَنَّ رَسُولَ اللهِ ﷺ كَانَ «إِذَا أَرَادَ أَنْ يَنَامَ وَهُوَ جُنُبٌ تَوَضَّأَ وَإِذَا أَرَادَ أَنْ يَأْكُلَ غَسَلَ يَدَيْهِ»