Abstract Aim Smartphone use has become prevalent and rapidly expanding. Therefore, it is essential to determine the potential adverse effects. This study aims to assess the prevalence of smartphone use at bedtime and its association with sleep quality and educational-related activities among medical students. Subject and methods The current cross-sectional study included 1184 male and female undergraduate medical students at Al-Azhar University in Cairo. We used a self-administered questionnaire to collect data on personal characteristics, smartphone use, and academic activities. The Pittsburgh sleep quality index ((PSQI) was used for the assessment of sleep quality. Results The result revealed that bedtime smartphone use was highly prevalent (96.5 %), with nearly half (46.9%) of studied medical students using them for more than 2 hours. Social media was at the top of the usage list (74.2%), followed by communication (48.8%). Smartphone users at bedtime had a significantly higher prevalence of poor sleep quality, increased sleep latency, difficulty in maintaining sleep, and shorter sleep duration compared to non-user (p-value<0.05). The probability of poor sleep quality is significantly increased by bedtime smartphone use, regular coffee drinking, hostel residence, and proximity of the phone during sleep, whereas the likelihood of poor sleep quality is significantly decreased by physical activity. A significant association between poor sleep quality and academic performance was also reported. Conclusion This study emphasizes the negative impact of smartphone use at bedtime on sleep quality and quantity, which in turn has a negative effect on academic performance. Therefore, medical students are strongly encouraged to limit their smartphone use before bedtime for better sleep and academic performance.