It’s a rat study, but my guess is it’s applicable to humans as well:
Study Objectives:Sleep deprivation negatively affects memory consolidation, especially in the case of hippocampus-dependent memories. Studies in rodents have shown that 5 hours of sleep deprivation immediately following footshock exposure selectively impairs the formation of a contextual fear memory. In these studies, both acquisition and subsequent sleep deprivation were performed in the animals’ main resting phase. However, in everyday life, subjects most often learn during their active phase.
Design:Here we examined the effects of sleep deprivation on memory consolidation for contextual fear in rats when the task was performed at different times of the day, particularly, at the beginning of the resting phase or right before the onset of the active phase.
Measurements and Results:Results show that sleep deprivation immediately following training affects consolidation of contextual fear, independent of time of training. However, in the resting phase memory consolidation was impaired by 6 hours of posttraining sleep deprivation, whereas, in the active phase, the impairment was only seen after 12 hours of sleep deprivation. Since rats sleep at least twice as much during the resting phase compared with the active phase, these data suggest that the effect of sleep deprivation depends on the amount of sleep that was lost. Also, control experiments show that effects of sleep deprivation were not related to the amount of stimulation the animals received and were therefore not likely an indirect effect of the sleep-deprivation method.
Conclusion:These results support the notion that sleep immediately following acquisition, independent of time of day, promotes memory consolidation and that sleep deprivation may disrupt this process depending on the amount of sleep that is lost.
Source: “A time for learning and a time for sleep: the effect of sleep deprivation on contextual fear conditioning at different times of the day.” from SLEEP 2010;33(10):1315-1322.