For the first time, scientists can see how the brain records our memories as we sleep