Sleep has been implicated in both memory consolidation and forgetting of experiences. However, it is unclear what governs the balance between consolidation and forgetting. Here, we tested how activity-dependent processing during sleep might differentially regulate these two processes. We specifically examined how neural reactivations during non-rapid eye movement (NREM) sleep were causally linked to consolidation versus weakening of the neural correlates of neuroprosthetic skill. Strikingly, we found that slow oscillations (SOs) and delta (delta) waves have dissociable and competing roles in consolidation versus forgetting. By modulating cortical spiking linked to SOs or delta waves using closed-loop optogenetic methods, we could, respectively, weaken or strengthen consolidation and thereby bidirectionally modulate sleep-dependent performance gains. We further found that changes in the temporal coupling of spindles to SOs relative to delta waves could account for such effects. Thus, our results indicate that neural activity driven by SOs and delta waves have competing roles in sleep-dependent memory consolidation.