1. A system for enhancing memories during sleep, the system comprising: one or more processors and a non-transitory memory having instructions encoded thereon such that when the instructions are executed, the one or more processors perform operations of: recording, via at least one transcranial sensor, transcranial sensor electrical signals during learning or recall of a memory; using magnetic resonance imaging (MRI) data, mapping the transcranial sensor electrical signals to voxels of brain volume; translating the mapped transcranial sensor electrical signals into an electric field by using an optimization technique to solve for the electric field; upon detection of non-rapid eye movement (NREM) slow-wave sleep, applying, via a set of electrodes, the electric field.