Does low vitamin d cause insomnia?

Maybe it's something else but if i don't take my meds i don't fall asleep.