Same as any other ship-based aircraft does if it loses, or cannot return to, its ship? If possible find another place to land. Preferably another carrier or a friendly ship with floatplane capacity in this case, or a friendly or at least neutral airfield. Neutral airfields is not as attractive as it sounds. The Haag convention stipulates that neutral countries must detain soldiers from warring countries until the cessation of hostilities. Depending on which country you land in and how friendly they are you could be looking at years in prison. Still, it generally beats landing in the drink.
This was the fate of Edward York and his crew after the Doolittle raid when they landed at Vozdvizhenka airfield outside Vladivostok. They spent nearly two years in prison until the NKVD decided that they were to be allowed to "escape" to Iran (which was friendly at the time). I say escape because the official story was that they bribed a smuggler to help them escape prison and make their way to Iran. In reality the NKVD staged the whole thing as a way to circumvent international law.
The same was true for American air crews who landed in Sweden, primarily after raids against occupied Norway or Germany. Some 1200 airmen were placed in "POW camps" until the end of the war. I use the term "POW camp" very loosely here because it was a HELL of a difference between being in a camp in Sweden and ending up in a German Stalag. I Sweden the airmen were generally free to move around so long as they returned to camp at night (although more than a few is known to have spent a night or two with some Swedish woman), attend dances and generally do what they pleased.
The second option is to radio your location and ditch in the sea and hope someone heard you and is coming to pick you up. There were many cases in WW2 when carriers were sunk or damaged and aircrews simply ditched near some other friendly ship. Worst case no one finds you and you die of dehydration or drowning, or the enemy finds you and you are executed or put in a hostile POW camp.