From http://www.althealth.co.uk/services/...min_b12_1.php:

Some research suggests that vitamin B12 might affect sleep quality and performance. In a 1996 study, researchers explored the effects of 3 mg of vitamin B12 on the quality of sleep and work performance of ten healthy, male staff members of an Austrian industrial plant. The results showed better sleep quality and shorter total sleep time in those taking supplements. (Bohr KC. Effect of vitamin B12 on sleep quality and performance of shift workers. Wien Med Wochenschr, 1996, 146:13-14, 289-91)