University students are often prescribed caffeine to boost their alertness and to remain focused during academic activities, but late and excessive consumption has been recommended to have a negative effect on sleep quality. This study aimed to explore the relationship between caffeine-related behaviors and sleep quality among students of the Institute of Management/Al-Rusafa, and to assess the predictive ability of an interpretable machine learning model to identify students with poor sleep. A cross-sectional design was used on 400 students. Sleep quality was measured by the Pittsburgh Sleep Quality Index (PSQI), with a global score higher than 5 considered as poor sleep. The independent variables were level of caffeine consumption, frequency of caffeine consumption, sleep duration, regularity of morning awakening, perceived stress, and selected lifestyle factors. A Classification and Regression Tree (CART) algorithm based on the Gini impurity criterion yielded this. Model complexity was optimized by both pre-pruning and post-pruning to minimize overfitting. Stratified k-fold cross-validation and an initial held-out test set were used to evaluate the model performance. Performance measures were accuracy, sensitivity (recall), specificity, precision, F1-score, balanced accuracy, and area under the receiver operating characteristic curve (AUC). The model had an accuracy of 85.0% on the held-out test set (n = 40) and correctly classified 34 students. There were higher recall scores for good sleep in the model compared to poor sleep (90.9% vs 77.8%). Although preliminary, because of the small sample size, the AUC of 0.843 indicated good discriminative ability. In summary, caffeine-related behaviors were correlated with sleep quality, especially regarding the timing and frequency of consumption, and the model using the CART showed good interpretability and predictive ability, but needs to be validated in other studies.