Sleeping less than the recommended eight hours a night is associated with intrusive, repetitive thoughts like those seen in anxiety or depression, according to new research.