The Messenger of Allah ﷺ said: When anyone amongst you wakes up from sleep at night, he should not put his hand in the utensil until he has washed his hand three times, for he does’ not know where his hand was during the night. (Using translation from Abū Dāʾūd 103)
"إذَا قامَ أحدُكمْ مِنَ اللَّيلِ فلا يغمسْ يدهُ في الإناءِ حتَّى يغْسِلَها ثلاث مرات؛ فإِنَّه لا يدرى أينَ باتَتْ يدُهُ".