Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:201Abū Zakariyyā b. Abū Isḥāq al-Muzakkī > Abū al-ʿAbbās Muḥammad b. Yaʿqūb > al-Rabīʿ b. Sulaymān > al-Shāfiʿī > Mālik > Abū al-Ḥasan ʿAlī b. Aḥmad b. ʿAbdān al-Ahwāzī > Aḥmad b. ʿUbayd al-Ṣaffār > Ismāʿīl b. Isḥāq > ʿAbdullāh / al-Qaʿnabī > Mālik > Abū al-Zinād > al-Aʿraj > Abū Hurayrah

[Machine] The Messenger of Allah ﷺ said: "When one of you wakes up from his sleep, let him wash his hands before placing them in his ablution, for one of you does not know where his hand has spent the night."  

البيهقي:٢٠١حَدَّثَنَا أَبُو زَكَرِيَّا بْنُ أَبِي إِسْحَاقَ الْمُزَكِّي ثنا أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ يَعْقُوبَ ثنا الرَّبِيعُ بْنُ سُلَيْمَانَ أنا الشَّافِعِيُّ أنا مَالِكٌ وَأَخْبَرَنَا أَبُو الْحَسَنِ عَلِيُّ بْنُ أَحْمَدَ بْنِ عَبْدَانَ الْأَهْوَازِيُّ أَخْبَرَنَا أَحْمَدُ بْنُ عُبَيْدٍ الصَّفَّارُ ثنا إِسْمَاعِيلُ بْنُ إِسْحَاقَ ثنا عَبْدُ اللهِ يَعْنِي الْقَعْنَبِيَّ عَنْ مَالِكٍ عَنْ أَبِي الزِّنَادِ عَنِ الْأَعْرَجِ عَنْ أَبِي هُرَيْرَةَ

أَنَّ رَسُولَ اللهِ ﷺ قَالَ إِذَا اسْتَيْقَظَ أَحَدُكُمْ مِنْ نَوْمِهِ فَلْيَغْسِلْ يَدَهُ قَبْلَ أَنْ يُدْخِلَهَا فِي وَضُوئِهِ فَإِنَّ أَحَدَكُمْ لَا يَدْرِي أَيْنَ بَاتَتْ يَدُهُ  

رَوَاهُ الْبُخَارِيُّ فِي الصَّحِيحِ عَنْ عَبْدِ اللهِ بْنِ يُوسُفَ عَنْ مَالِكٍ وَأَخْرَجَهُ مُسْلِمٌ مِنْ وَجْهٍ آخَرَ عَنْ أَبِي الزِّنَادِ وَثَبَتَ عَنْ مُحَمَّدِ بْنِ سِيرِينَ وَهَمَّامِ بْنِ مُنَبِّهٍ وَعَبْدِ الرَّحْمَنِ بْنِ يَعْقُوبَ وَثَابِتٍ مَوْلَى عَبْدِ الرَّحْمَنِ بْنِ زَيْدٍ عَنْ أَبِي هُرَيْرَةَ عَنِ النَّبِيِّ ﷺ هَذَا الْحَدِيثَ دُونَ ذِكْرِ التَّكْرَارِ

See similar narrations below:

Collected by Mālik
malik:2-7Yaḥyá > Mālik > Abū al-Zinād > al-Aʿraj > Abū Hurayrah

Yahya related to me from Malik from Abu'zZinad from al-Araj from Abu Hurayra that the Messenger of Allah ﷺ said, "When you wake up from sleep to pray, wash your hands before you put them in the wudu water, for you do not know where your hands have spent the night."  

مالك:٢-٧حَدَّثَنِي يَحْيَى عَنْ مَالِكٍ عَنْ أَبِي الزِّنَادِ عَنِ الأَعْرَجِ عَنْ أَبِي هُرَيْرَةَ

أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ إِذَا اسْتَيْقَظَ أَحَدُكُمْ مِنْ نَوْمِهِ فَلْيَغْسِلْ يَدَهُ قَبْلَ أَنْ يُدْخِلَهَا فِي وَضُوئِهِ فَإِنَّ أَحَدَكُمْ لاَ يَدْرِي أَيْنَ بَاتَتْ يَدُهُ