Hello,Welcome to Just Answer. It is my pleasure to help you today!
The recommended dose of B12 is 25-100mcg. B12 itself helps nerve function and red blood cell formation. It also stores in the body for a while and deficiency is rare.
It could indeed be keeping you awake. You could try skipping it for a few days to see if that is indeed the cause.
Other supplements such as vitamin c, garlic, acidophilus have proven to be more effective to strengthen the immune system.
If you are on any prescription medicines they could also be interfering with your sleep.
Avoid caffeine/chocolate as they are stimulants.
Stress and worries can also cause insomnia.
Let me know if you have any other questions.