Prof Maxwell Shafer studies the ways sleep behaviour evolves, including shifts from nocturnal to diurnal activity.
His lab records the activity of various species of fish over many days and nights. His recent research integrated these results with previously published data to create an in-depth profile of nocturnal and diurnal activity of nearly 4000 fish species.
Mapping this activity back through time on ancestral organisms suggests that nocturnal activity can provide a survival advantage during mass extinctions. By coming out only in the dark, Max proposes that nocturnal animals avoided potentially lethal daytime temperatures during extinctions 145 and 66 million years ago.
As the environment stabilized, nocturnal species could exploit now-empty niches by shifting to diurnality and diversifying.
You can read more about this research in Science Magazine: “Do nocturnal habits protect animals from extinction?“.