The Mishna Brura (Orach Chaim 4:1,4:8) gives several different possible reasons for the three-time hand washing we perform each morning upon awaking. It does not decide which reason is correct, but says that we are careful to keep the stringencies that would be implied by each of the three reasons.
The reasons are:
1. Your hands move around at night. They may have touched dirty parts of the body and become dirty themselves. If that happened, they must be washed before praying or saying blessings.
2. Sleep is associated with death ("one sixtieth part of death" according to Brachot 57b). Death is associated with an "evil spirit" ("ruach raah") which supposedly can harm you if it enters your body (generally through an orifice). You must wash your hands each morning to remove the evil spirit that has descended upon your hands. If you touch a bodily orifice before washing your hands in the morning, the evil spirit will enter your body and harm you. If you touch food before washing your hands, whoever eats the food will suffer the same consequences.
This idea of evil spirits is an interesting parallel to the modern idea of infectious diseases, which could be contracted by touching a diseased corpse, and which hand washing would defend against.
3. Sleep is associated with death, and upon awaking one is effectively reborn.
This last reason has interesting parallels in other areas of halacha. 1) A convert must immerse upon being "reborn" as a Jew. 2) A woman must immerse when a new egg appears in her reproductive system, before having relations with her husband and converting that egg into a new living being.