Different forms of Vitamin D3 causing insomnia?

Why is it that different forms of vitamin d affect me differently? Taking vitamin d3 pills give me insomnia at night but drowsiness after taking, eating a high vitamin d3 diet makes me sleepy but no insomnia, and getting sunlight gives me the best benefits overall of no drowsiness or insomnia.

Edit: Took 10k iu of vitamin d3 at 12pm and couldn't sleep until 7am the next day. I was then able to sleep until 3pm later that day. I was awake for 18 hours.

Edit 2: Day 2 of terrible insomnia and its 7am and I still haven't slept all night. I'm tired but can't fall asleep. I suspect this vitamin d won't leave my system for a while. I will probably have this insomnia for a week. I'll report back later.