Many of us do it regularly. We get the upgrade and "give it to a wife / SO / friend/ etc. We just do it. The FA may or may not address the person by your name when choosing a meal. If there's an obvious indication that she/he isn't you, other sex for example, have them tell the FA that you gave them your seat. It isn't a big deal. DO NOT however swap back during the flight, that's a no-no.
I don't believe that there's a formal policy but this is done regularly and isn't a big deal.