When the Prophet ﷺ wanted to sleep while in a state of major ritual impurity, he would perform ablution as he did for prayer. And when he wanted to eat while in that state, he would wash his hands.
حدثنا محمد بن الصباح البزاز حدثنا ابن المبارك عن يونس عن الزهري عن أبي سلمة،
أن النبي ﷺ كان إذا أراد أن ينام وهو جنب توضأ وضوءه للصلاة. وإذا أراد أن يأكل وهو جنب غسل يديه
(89) Sourcing, [sahih], see the previous hadith. Zuhri explicitly stated that he heard it directly, as recorded by Baghawi in Sharh al-Sunnah, 2/34. (Tuhfah)