Sayyiduna Abu Hurayrah (may Allah be pleased with him) says that the Messenger of Allah (peace and blessings be upon him) said: "When one (of you) wakes up, he should not put his hand into the vessel, or he said: into the water, until he has washed it three times, for he does not know where his hand spent the night."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 1155