Slow-wave sleep (SWS) is characterized by synchronized neural activity alternating between active upstates and quiet downstates. The slow-oscillation upstates are theorized to provide a window of opportunity for memory consolidation, and memory reactivation underlying consolidation may occur preferentially during these times. Memory reactivation occurs spontaneously during sleep and can also be induced by presenting learning-related cues associated with a prior learning episode. This technique, targeted memory reactivation (TMR), selectively enhances memory consolidation. We previously found that slow-wave phase at time of stimulation predicts this behavioral memory benefit, supporting the hypothesis that memory reactivation is most likely during cortical upstates (Batterink, Creery & Paller, 2016). In the present study, we directly tested this idea by using an open-loop real-time algorithm to deliver auditory cues to sleeping subjects at these hypothesized optimal and suboptimal slow-oscillation phases. Consistent with our hypothesis, we found that cues that were targeted to occur at the a priori optimal phase were associated with a larger memory benefit compared to cues targeted at the suboptimal phase. These results provide direct evidence that memory processing occurs preferentially during cortical upstates, and also suggest that TMR effects may be enhanced by selectively targeting the cortical upstate in real time.