I'm not sure how anyone could be this naive. Mammal brains don't have this train mode inference mode. They are both running at all times. If what you said was true, if I taught you something today you wouldn't be able to perform that action till tomorrow. Hell, schools would be an insane concept if this were true. Try to think a bit more before confidently stating an answer.
Sleep could be for long term memory, but clearly not everything else is "context" (short term memory). Maybe you learn something in the morning which requires you to remember it for >12 hours before you go to bed.
It's not clear it is one. Sleep is training (replay from hippocampus). Wake is inference.