Howdy!
I have considered the same issue, years ago. I don't have
children (yet), so no need yet to implement. But I have given it thought.
My thinking is that a Hammock is one of the best ways to enjoy a good sleep when aboard a
boat. It is the traditional sailors
bed.
If I had a young child, I would rig the hammock over a berth that has a mattress below. During the day, if in the
Saloon, this would be over a settee the cushion of the leeward settee. As mentioned before (by Belizesailor I recall) the hammock that does NOT have the spreader bars at both ends will envelope the body, like those slings that mothers use to haul a baby around when
shopping or walking.
I think a sleeping child will easily adapt to that same motion and comforting wrap-around snugness. I know I would, even as an adult.
In fact the rocking of a boat is likely one of the best feelings and harkens back to being rocked in the arms of a mother.
There is a website for anything one can think of! Here is a link to an entire site and forum devoted to hammock making and using.
https://www.hammockforums.net/forum
A few photos of sailors in different navies using hammocks for their beds/berths.
Also, a cute
photo of the ship's cat in his own hammock (WW1 or WW2 era convoy ship).