The Messenger of Allah ﷺ did not pray over Maez bin Malik, nor did he forbid praying over him.
حدثنا أبو كامل حدثنا أبو عوانة عن أبي بشر حدثني نفر من أهل البصرة
أن رسول الله ﷺ لم يصل على ماعز بن مالك ولم ينه عن الصلاة عليه
Sourcing, its chain is daif. Bayhaqi narrated it, 19/4, from the hadith of Abu Awana with the same wording. The Basran men are all unknown, and the hadith of Abdul-Razzaq, 13339, and Bukhari, 6820, suffices in its place.