Sleep deprivation can cause anxiety and depression—and the problem goes both ways