Netilat Yadayim upon Waking Up

From Halachipedia

The Shulchan Aruch (4:13) writes that there is a doubt whether one makes a Bracha on Netilat Yadayim on the morning after staying up all night. Similairly, the Rama (ibid) comments that one should do netilat Yadayim without a Bracha.

The source of the Shulchan Aruch's doubt is the dispute for doing Netilat Yadayim in the morning. The Rosh (Brachot 9:23) says because one's hands are "עסקניות" (literaly busy) and they may have touched an unclean part of the body during one's sleep, it's an obligation to do Netilat Yadayim in the morning. As a support to his view that we wash our hands for cleanliness before prayer he quotes the pasuk from Tehilim (26:6) "אֶרְחַץ בְּנִקָּיוֹן כַּפָּי ". On the other hand, the Rashba (Teshuvat HaRashba 1:191) argues on the Rosh claiming that there is no source for the idea of the Rosh. Rather the reason is that we are purifying our hands for the whole day (theoretically even to cover washing before bread) and the reason that we do it specifically before Shacharit is that when we wake up in the morning it's as if we are created anew as it says in Eicha (3:23) חֲדָשִׁים לַבְּקָרִים רַבָּה אֱמוּנָתֶךָ.

A practical difference (explained by the Bet Yosef (4:13)) that emerges from the dispute is a case of a person that didn't go to sleep at night. According to the Rosh, since one didn't go to sleep there is no doubt that a person would have touched an unclean area and so, there's no need for Netilat Yadayim. On the other hand, the Rashba holds that since we are created new everyday we need Netilat Yadayim even if one didn't go to sleep that night. Another concern that compounds the doubt of the Shulchan Aruch is the aspect of רוח רעה that is mentioned by the Tur (4:1) and so, even according to the Rosh one should still need to do Netilat Yadayim. Nontheless based on a quote from the Zohar (Vayishlach 169b), the Bet Yosef (ibid) argues that the issue of רוח רעה only applies to the nightime.

Rav Ovadiah(Chazon Ovadiah, Shavuot, note 25) mentions that even though the Maharsham (3:126) holds that one even makes a bracha on Netilat Yadayim of Birkat Cohanim and going to the bathroom; nevertheless, we don't hold like the Maharsham in this Halacha, says Rav Ovadiah Yosef. The Mishna Berurah(4:27) adds that if one indeed went to sleep a שינת קבע (a substantial sleep) on his bed, then one makes netilat Yadayim with a Bracha.