Experts analysed more than one million nights of sleep. Here’s what they found