The nocturnal bottleneck hypothesis is a hypothesis to explain several mammal traits. The hypothesis states that mammals were mainly or even exclusively nocturnal through most of their evolutionary story, starting with their origin 225 million years ago, and only ending with the demise of the dinosaurs 65 millions years ago. While some mammal groups have later evolved to fill diurnal niches, the 160 million years spent as nocturnal animals has left a lasting legacy on basal anatomy and physiology, and most mammals are still nocturnal.
Mammals evolved from cynodonts, a group of superficially dog-like mammal-like reptiles in the wake of the Permian–Triassic mass extinction. The emerging archosaurian groups that flourished after the extinction, including crocodiles and dinosaurs and their ancestors, drove the remaining larger cynodonts into extinction, leaving only the smaller forms. The surviving cynodonts could only succeed in niches with minimal competition from the diurnal dinosaurs, evolving into the typical small-bodied insectivorous dwellers of the nocturnal undergrowth. While the early mammals continued to develop into several probably quite common groups of animals during the Mesozoic, they all remained nocturnal.
Only with the massive extinction at the end of the Cretaceous did the dinosaurs leave the stage open for the establishment of a new fauna of mammals. Despite this, mammals continued to be small-bodied for millions of years. While all the largest animals alive today are mammals, the majority of mammals are still small nocturnal animals scurrying around in the undergrowth.
Several different features of mammalian physiology appear to be adaptations to a nocturnal lifestyle, mainly related to the sensory organs. These include: