Abstract Sleep occupies a large part of our lives and is widely believed to perform essential functions. During sleep, the neuronal rules of engagement and population dynamics are clearly different than waking. There is extensive evidence that one primary function of sleep is to consolidate memories formed during waking. Recent work, however, suggests that sleep may also actively alter neural connections to achieve forgetting (‘unlearning’). How the brain balances learning and forgetting, exactly how sleep contributes, and the ultimate effects on ensembles and behavior are unknown. The goal of this proposal is to determine how neuronal population dynamics during non-rapid-eye- movement sleep (NREMS) achieve learning vs forgetting. We specifically aim to examine how activity during NREMS regulates coupling across the cortex and the striatum, trial-to-trial variability of neural ensembles (“representational variance”) and thereby behavioral automaticity versus flexibility. Automaticity – the consistent production of a contextually-driven, fast and accurate action – is associated with increased cortico-striatal coupling and reliable ensemble activity (low variance). In contrast, weaker cortico-striatal coupling is associated with flexible, exploratory states and increased representational variance. We will use a rat model of motor skill learning (reach-to-grasp), together with multi-site electrophysiology, identification of specific neuronal subtypes, closed-loop perturbations, and detailed computational modelling. We will determine how specific NREMS dynamics differentially regulate the reactivation of neuronal ensembles, to enable distinct forms of activity-dependent plasticity. Based on extensive preliminary data, we hypothesize that global slow oscillations coupled to spindles trigger globally coordinated reactivations that are broadly coordinated between cortical and striatal subregions. These coordinated reactivations strengthen functional connections and produce earlier firing of ‘direct pathway’ striatal neurons, promoting automaticity. By contrast, local up-states occurring during delta waves produce uncoordinated reactivations, leading to functional decoupling of corticostriatal connections and earlier firing of ‘indirect pathway’ striatal neurons to promote exploration and flexibility. Our closely integrated electrophysiological, optogenetic and computational investigations will provide novel mechanistic insights into precisely how brain dynamics during sleep achieve both consolidation and unlearning of specific behavioral patterns. This knowledge has great potential to help us better understand and treat the wide range of neurological and psychiatric illnesses associated with alterations in cortico-striatal processing.