Hi!
I'm not quite sure, are we talking about new materials or existing materials?
if it is just a question of creating new materials, you can use a script like this one to do so:
import maya.cmds as mc
sel = mc.ls(sl = True)
for s in sel:
mat = mc.createNode("aiStandardSurface", n = "{0}_material".format(s))
sg = mc.createNode("shadingEngine", n="{0}_SG".format(s))
mc.connectAttr("{0}.outColor".format(mat), "{0}.surfaceShader".format(sg))
shape = mc.listRelatives(s, s= True)[0]
attr = mc.listConnections("{0}.instObjGroups[0]".format(shape), p = True)[0]
mc.disconnectAttr("{0}.instObjGroups[0]".format(shape),attr)
mc.connectAttr("{0}.instObjGroups[0]".format(shape),"{0}.dagSetMembers[0]".format(sg))
If you need to connect the right existing materials with their geometric counterparts, it is going to be harder, because you would need very strict consistent naming conventions to write a script that does that.
I hope this helps!