Typically reactions to B12 are an indication of deficiency.
That being said I have found that many supps, Iodine included, made my afib worse for a time before it improved. Call it detox, healing or what have you.
Most B vits I take before mid afternoon or yes, they can keep you up. By doing so I have no problems falling asleep and I also find I sleep better and need less sleep since starting B12/B9.