mammals, birds and reptiles evolved from amniotic ancestors, the first vertebrates with life cycles independent of water. the fact that birds and mammals are the only known animals to exhibit rem and nrem sleep indicates a common trait before divergence. however, recent evidence of rem-like sleep in fish suggests this divergence may have occurred much earlier than previously thought. up to this point, reptiles were considered the most logical group to investigate the origins of sleep. daytime activity in reptiles alternates between basking and short bouts of active behavior, which has significant neurological and physiological similarities to sleep states in mammals. it is proposed that rem sleep evolved from short bouts of motor activity in reptiles while slow-wave sleep (sws) evolved from their basking state which shows similar slow wave eeg patterns.