The bodies of the dead are covered in hardened clay casts, or something sufficiently sturdy to give them structure.
These casts would be brought to the edge of the coral reef, where they would be placed like a memorial. Friends, family, or community could come and pay their respects to them in a ritual where they give the body back to the sea, similar to a sky burial mentioned in other answers. The cast would be adorned with coral polyps, giving the coral a head start on forming.
Depending on the social structure in your story, perhaps the royal family has some responsibility to maintaining the reef, and as such are able to adorn their dead with more polyps, to mark their contribution to society, and their eagerness to give back to the coral, by providing more head starts.
A few small holes could exist in the cast, which would allow water currents to pass through, bringing with it small organisms. These organisms would feed on the body inside the cast, and the coral would feed on those organisms that got swept out through the holes.
In this sense, The Reef becomes their ancestors.