Your sleep pattern could influence how vulnerable you are to certain mental health problems.