That's the proper analogy.
And comparing a ship's captain to a babysitter? When a babysitter comes to my house I expect them to be attentive for 4 hours and then to go home. I don't expect captains to never sleep during long voyages. There is a whole process around allowing the captain to sleep, and waking them for any possible problem, which obviously didn't occur her.
But by all means some posters can compare his job to babysitting.
So yes, provision has to be made for a CO to sleep at some point. And the Navy accordingly has provisions for this -- provisions which failed here. The CO will be held accountable for maintaining -- or not -- an environment conducive to safe navigation, but in any event the blame will not attach solely to the CO here.