Can I take vitamin b6 after 4 hrs of sleep and then go back to sleep? Is it better than taking it before going to bed?

And how much should I take?