Despite vitamin B12’s recognized importance for the nervous system, there is still a lack of research on the association between vitamin B12 and sleep, especially in primary care settings. We assessed vitamin B12 levels in adult primary healthcare users and investigated correlations with sleep quality, insomnia, and sleepiness. In this cross-sectional study, 512 consecutive participants were included. Information regarding anthropometrics, socio-demographics, and medical history was obtained. The Epworth Sleepiness Scale (ESS), Athens Insomnia Scale (AIS), and Pittsburg Sleep Quality Index (PSQI) were used to quantify excessive daytime sleepiness (EDS), insomnia symptoms, and sleep quality, respectively. The median vitamin B12 was 342 (266, 446) pg/mL. After adjustments, vitamin B12 levels < 342 pg/mL showed significant associations with insomnia symptoms [OR (95% CI) 2.434 (1.331–4.452), p = 0.004], especially in elderly, non-obese, and female participants, with EDS only in obese participants [OR (95% CI) 3.996, (1.006–15.876), p = 0.039]. Nonetheless, there was no significant association between B12 levels and poor sleep quality (OR 1.416, 95% CI 0.678–2.958, p = 0.354). In conclusion, our results show that lower vitamin B12 was associated with insomnia symptoms and sleepiness in specific groups of participants. However, further research with objective measurements of sleep is crucial to assess the relationship between sleep and vitamin B12.