Hacham Ovadia Yosef, in his work Halichot Olam (vol. 1, p. 32), rules that it is permissible to dress oneself in the morning before he washes his hands. This ruling is in opposition to the view of the Ben Ish Hai (Rabbi Yosef Haim of Baghdad, 1833-1909), in Parashat Toledot (6), that one may not touch his clothing in the morning before he washes his hands. The Ben Ish Hai held that it is improper even to put on socks before washing one's hands in the morning. Hacham Ovadia, however, held that one may be lenient in this regard, though those who make a point of washing their hands before dressing, in accordance with the Ben Ish Hai's position, are deserving of reward. He adds that if one did not go to sleep until after Hasot – midnight as defined by Halacha – then there is even more basis to be lenient, as some authorities maintained that no Tum'a (impurity) descends upon a person's hands in such a case. It must be emphasized, however, that according to the accepted Halacha one must wash his hands with a Beracha upon awakening in the morning even if he went to sleep after Hasot.
If a person plans to remain awake through the night, but sleeps for an hour or two before Hasot, must he wash his hands when he awakens?
The Ben Ish Hai rules that in such a case one must wash his hands with a Beracha. Hacham Ovadia, however, maintains that in this situation one should not recite the Beracha over the hand washing, though those who wish to recite the Beracha in accordance with the view of the Ben Ish Hai may do so. Needless to say, if one went to sleep before Hasot and rises only after Hasot, he must wash his hands with a Beracha according to all views.
Summary: It is permissible to dress oneself before washing his hands in the morning, though it is commendable to be stringent in this regard in situations where one went to sleep before Hasot (midnight as defined by Halacha). One who goes to sleep before Hasot and wakes up before Hasot must wash his hands, but preferably without a Beracha. Nevertheless, those who wish to recite a Beracha in such a case have authorities on whom to rely.