Nocturnal bottleneck

The nocturnal bottleneck hypothesis is a hypothesis to explain several mammalian traits. In 1942, Gordon Lynn Walls described this concept which states that placental 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 non-avian dinosaurs 66 million years ago. While some mammal groups have later evolved to fill diurnal niches, the approximately 160 million years spent as nocturnal animals has left a lasting legacy on basal anatomy and physiology, and most mammals are still nocturnal.
Evolution of mammals.
Mammals evolved from cynodonts, a group of superficially dog-like synapsids 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 relatively small and 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.
Mammalian nocturnal adaptions.
Several different features of mammalian physiology appear to be adaptations to a nocturnal lifestyle, mainly related to the sensory organs. These include: