People’s emotional functioning suffers when their sleep is disrupted, study finds