The Gemara teaches that sleep is one-sixtieth of death. When a person falls asleep, the soul partially departs, making sleep a form of quasi-death. Just as actual death causes tumah, spiritual impurity when the soul leaves the body, so too, sleep brings about a form of tumah, manifesting as a ruach ra'ah—a negative spiritual force—that rests upon the hands.
Why does the ruach ra'ah specifically attach itself to the hands? With other spiritual impurities such as tumas niddah (impurity because of menstruation), tumas keri (impurity from a seminal emission) or tumas meis (impurity due to a corpse), it affects the entire body.
The Shelah Hakadosh explains that the human body parallels the universe and is therefore referred to as an olam katan, a microcosm of the world. Each body part is a microcosm of the components of the world.
As long as sin persists in the world, forces of impurity continue to exist and attach themselves to the world. The “arms” of the world metaphorically hold onto this impurity, just as the hands and arms of a person physically grasp and hold objects. Because the hands serve as klei kibbul, vessels for receiving they become the resting place for this ruach raah.
When tumah takes on a more intense form, such as in the case of a corpse (tumas meis), seminal emission (tumas keri) or menstruation (nidah), the impurity affects the entire body. In those cases, where the tumah rests on the entire body, full immersion of the entire body in a mikvah is required. But for the spiritual residue left by sleep, washing the hands is sufficient to remove the ruach ra'ah and restore purity.