It could be beneficial because it assists in the release of growth hormone which is also trigered by sleep.
It also helps with the formation of collagen so it would also help repair which also happens during sleep, so in theory it could help if taken before bed.
Oh and I personally hate
ZMA btw, waste of money imo