L.B.
I think you need to cut back on the naps. My kids have had a lot of Z-pack/liquid azithromycin and the only side effects were the belly aches. I agree with the other posters: is he on any OTHER medication in addition to the Z-pack? That might have caused the insomnia.
You didn't mention if he had any other complaints when he was up...belly ache, tooth ache, head ache...could have been something else going on too.
If you think that this is causing the insomnia, then I would suggest giving him the medicine in the morning with breakfast. It's only a serving a day. I know there is quite a bit of sugar in that solution so that alone might be your culprit!