Experiments with mice have shown that if you shock mice at certain times during sleep, their fear conditioning will change. https://academic.oup.com/sleep/article/26/5/527/2707886 This seems to indicate that sleep acts like an unsupervised learning reinforcer.
Sleep might be required for a certain level of consciousness.