According to my lovely GP you need at least fifteen minutes of full sun on forearms and face each day. With the current advice to try to avoid skin cancer most moisturisers and foundations incorporate quite a high SPF which blocks the vitamin D.
It has been known since the beginning of the Covid-19 outbreak that Vitamin D levels need to be at an optimum level, not so much due to it being specific to the virus, but more because Vitamin D is very important at keeping our immune system healthy I believe.
I had heard about the link with melatonin and sleep disruption but as far as I know there has not been any scientific evidence to date. I always use my spray in the morning.
Taz x