Another way to say "People prefer to sleep in the dark" is "People have a preference for sleeping in the dark."