Probably worth getting blood B6 levels checked every now and then, taking reasonably big does like that can cause it to build up and eventually give you nerve damage leading to peripheral neuropathy.
Timing? How many hours before bed?
Magnesium around every half hour around 100mg starting 2h before bed, the rest when I go to bed.