While the other two songs are written/hidden as sheet music notes, A Song of the Sea's notes were coded symbols carved into the seal beside the queen and the citizen.
A year before Eternal Diva, Melina Whistler died from illness. She was the only person who knew A Song of the Sea, and could sing it, so Jean Descole worked with her father to build the Detragan as a way of resurrecting her: copying her memories, then 'downloading' them to a host's brain. Several subjects were tested, including Nina and Melina's best friend Janice.
When the Crown Petone broke away from the shore as a ship, trapping the contestants in the game for Eternal Life, Nina stood at the entrance staircase, singing A Song of the Sea out loud.
Later on, shortly after arriving at Ambrosia, Luke told Nina about how the sea can allegedly be heard if a seashell is held to the ear. He said that it never worked for him, but she said that she hears it, and hummed A Song of the Sea, saying that the sea taught it to her.
Whilst looking around the castle, Layton found Melina's bedroom. He played A Song of the Sea on the piano in her room from the sheet music to prevent Melina from leaving.
Once Janice was revealed as really being Melina (as the memory transfer had worked on her), Descole kidnapped her, then went on to explain that in order to raise the ruins of Ambrosia, A Song of the Stars had to be played in harmony with A Song of the Sea, both having been hidden in the Seal of Ambrosia, except that Melina had died before he could attempt it. Now that Melina was able to sing the melody again, he blackmailed her into doing so to reveal Ambrosia, but it did not work.
After saving Melina from falling off the Detra-Gigant and engaging in a duel with Descole, Layton went on to explain why the music did not raise Ambrosia. There was actually three songs in the seal, not two, the third revealed by turning the seal upside down, A Song of the Sun. Layton played this and A Song of the Stars on the Detragan organ; with Melina singing A Song of the Sea, Ambrosia rose out of the sea.