Sleep marks passing time, giving us distance from the things that have hurt us. When a person is wounded they will often fall unconscious. Similarly, someone who hears traumatic news will often swoon or faint. This is the mind's way of protecting itself from pain.
Patrick Rothfuss (2010). “The Name of the Wind: The Kingkiller Chonicle:”, p.108, Hachette UK