Nocturnal hypoglycemia is a common phenomenon among patients with diabetes and can lead to a broad range of adverse events and complications. Identifying factors associated with hypoglycemia can improve glucose control and patient care. We propose a repeated measures random forest (RMRF) algorithm that can handle nonlinear relationships and interactions and the correlated responses from patients evaluated over several nights. Simulation results show our proposed algorithm captures the informative variable more often than naïvely assuming independence. RMRF also outperforms standard random forest and extremely randomized trees algorithms that naïvely assume independence. We apply our method to analyze a diabetes study with 2,525 nights from 127 patients with type 1 diabetes. We find nocturnal hypoglycemia is associated with age, HbA1c, diabetes duration, bedtime BG, insulin on board, exercise, and daytime hypoglycemia.