Drowsiness among drivers is a major hazard to road safety, resulting in innumerable incidents globally. Despite substantial study, existing approaches for detecting drowsiness in real time continue to confront obstacles, such as low accuracy and efficiency. In these circumstances, this study tackles the critical problems of identifying drowsiness and driver safety by suggesting a novel approach that leverages the combined effectiveness of Gated Recurrent Units (GRU) and Enhanced Deep Belief Networks (EDBN), which is optimised using COOT, a new bird collective-behavioral-based optimisation algorithm. The study begins by emphasising the relevance of sleepiness detection in improving driver safety and the limitations of prior studies in reaching high accuracy in real-time detection. The suggested method tries to close this gap by combining the GRU and EDBN simulations, which are known for their temporal modelling and feature learning capabilities, respectively, to give a comprehensive solution for sleepiness detection. Following thorough experimentation, the suggested technique achieves an outstanding accuracy of around 99%, indicating its efficiency in detecting sleepiness states in real-time driving scenarios. The relevance of this research stems from its potential to greatly reduce the number of accidents caused by drowsy driving, hence improving overall road safety. Furthermore, the use of COOT to optimize the parameters of the GRU and EDBN models adds a new dimension to the research, demonstrating the effectiveness of nature-inspired optimization methodologies for improving the performance of machine learning algorithms for critical applications such as driver safety.