There’s no set formal prayer to say at a viewing that I know of. You might want to say the usual prayer for the dead:
“Eternal rest grant unto him/her/them O Lord,
And let perpetual light shine upon him/her/them
And may he/she/they rest in peace. Amen.”
Depending on how long you’re there, you might want to say one or more decades of the Rosary or the Divine Mercy Chaplet.
I know it’s very common to say a group Rosary for the soul of a deceased loved one, but I’m not sure whether this is normally done at the viewing, in church before the memorial service/Mass, or elsewhere.