How could you test for something like that? Maybe, teach an array of skills, and for each skill with subjects of varying degrees of sleep deprivation and for varying time intervals between education and performance, measure response times and skill level in the tasks?
One way this 'replay' effect was tested was in rats where they implanted many electrodes into the animal's hippocampi to monitor activity. There are cells there called the hippocampal place cells which encode locations in space.
Then they had the rats run a simple circular maze with some landmarks (food, etc.) at various points. As they run the maze, different place cells start to encode different locations in the maze, especially near the landmarks, and they activate when the rat is near there.
They kept the electrodes in while the rat was sleeping. They found that the place cells continued to activate in the same order as the locations in the maze, as if the rat were actually running the maze in, e.g., a clockwise direction.
This is taken as evidence that, during sleep, the rat's brain was replaying the memory of running the maze.