I don't know why Socrates mentions God and gods; but it isn't an isolated phenomenon; for example:
Lucretious has an invocation to, I think Venus; and also to the One beyond all strife.
Parmenides in his proem, the Way of Truth and Opinion, invokes an (un-named) goddess whilst actually mediating on his notion of the One.
One possible suggestion might be that they were caught up in a transitional moment between the mythos of the old religion, which would retain its function and prestige as a civic religion, whilst theorising the logos of a new religion for the elite - recalling that Socrates was accused of corrupting the aristocratic youth of Athens.
Another suggestion might be - and I have no textual reference to offer here - so it's a speculative thought; is that it's a reflection of ancient Indo-European religion; for when we look at India it's noticeable there is Brahman, and there are avatars; and this too in Christianity - Jesus as the incarnation of (the second person) of God.