Identical brain mechanisms are responsible for triggering memory in both sleep and wakefulness, new research has shown.