A growing body of research shows that the stress and habits tied to sleeplessness can make it harder to rest the next night.