If the slightest sound wakes you, you might wish you slept more deeply. But several factors shape how much shut-eye you get.