From Bulbapedia, the community-driven Pokémon encyclopedia.
The Wonder Egg is an item found at the end of the Surrounded Sea along with 3 Deluxe Boxes. It goes into the Treasure Bag until the player leaves the dungeon. The next morning, the Wonder Egg hatches into a Manaphy, and the Wonder Egg cannot be collected again, so Manaphy is a one chance recruitment for the player's rescue team.
If a replay cheat is used to get Manaphy early the Wonder Egg will not hatch no matter how long the player leaves it.