It is generally a good idea to group together as many objects as possible sharing some state in order to amortize the cost of setting that state over all the objects in the group.
in practice there’s no correct answer to your question because it depends on the scene.
in theory however, most likely you’re going to have to change the modelview matrix for each object (unless you’re rendering a bunch of objects in the same exact place…which would be weird).
Since normally each object will have to update the modelview matrix you should try and group as many objects sharing material properties as possible.
This way you amortize the cost of setting the material over all the grouped objects.