ZMA seems to have differing effects on people's sleep. Some sleep great, some can't sleep, some have weird dreams. I've heard some of the weirdness attributed to the B6.
Personally, I only had weird dreams, but that went away after a week or so.
But you know, if it messed up your sleep, don't do it. Maybe take it earlier in the day (or one pill with each meal or something).