Hippocampal representations that underlie spatial memory undergo continuous refinement following formation during exploration. Understanding the role of sleep in this process has been challenging because of the inaccessibility of place fields when animals are not actively exploring a maze. Here, we used a novel Bayesian learning approach based on the spike-triggered average decoded position in ensemble recordings to track dynamically the spatial tuning of individual neurons during offline states in freely moving rats. Measuring these dynamic tunings, we found spatial representations within hippocampal sharp-wave ripples that were stable for hours during sleep and were strongly aligned with place fields initially observed during maze exploration. These representations were explained by a combination of factors that included the pre-configured structure of firing rates in sleep before exposure to the environment, and representations that emerged during theta oscillations and awake sharp-wave ripples on the maze, revealing the contribution of these events in forming ensembles during sleep. Strikingly, the ripple representations during sleep predicted the future place fields of neurons during re-exposure to the maze, even when those fields deviated from previous place preferences. These observations demonstrate that ripples during sleep drives representational drift observed across maze exposures. In contrast, we observed tunings with poor alignment to maze place fields during other time periods, including in sleep and rest before maze exposure, during rapid eye movement sleep, and following the initial several hours in slow-wave sleep. In sum, the novel decoding approach described here allowed us to infer and characterize the retuning of place fields during offline periods, revealing the rapid emergence of representations following novel exploration and the active role of sleep in the representational dynamics of the hippocampus.