A property of long-term memory (LTM) induction is the requirement for repeated training sessions spaced over time. This augmentation of memory formation with spaced resting intervals is called the spacing effect. We now show that in Drosophila, the duration of resting intervals required for inducing LTM is regulated by activity levels of the protein tyrosine phosphatase corkscrew (CSW). Overexpression of wild-type CSW in mushroom body neurons shortens the inter-trial interval required for LTM induction, whereas overexpression of constitutively active CSW proteins prolongs these resting intervals. These gain-of-function csw mutations are associated with a clinical condition of mental retardation. Biochemical analysis reveals that LTM-inducing training regimens generate repetitive waves of CSW-dependent MAPK activation, the length of which appears to define the duration of the resting interval. Constitutively active CSW proteins prolong the resting interval by altering the MAPK inactivation cycle. We thus provide insight into the molecular basis of the spacing effect.