I am trying to find a book that I believe I read as a child, but I think is older than me. Either that or it's a really vivid fever dream.
In it, two children finds themselves on an island, shipwreck or plane crash I think, and are imprisoned in a kind of apartment by a scientist. I distinctly remember them using toothpaste and shaving foam to destroy food they didn't like. It was delivered when a light over the door came on and they had to wait in another room.
At some point some science happens and one turns into some kind of sea creature, a manta ray or sting ray I think, and the other into a large bird. I think they have some telepathic link at some point, but it fades as they become more animal than human. The bird is trying to plot via sticks and berries to get them to escape. I don't remember how it ends, and there may have been a third child who is changed earlier than them.