^^
That one always confused me - you're meant to settle a child to sleep with those lyrics? I don't think so!
It works though doesn't it? How many children honestly lay awake interpreting it? Most would be soothed by the gentle swaying rhythm.
Most nursery rhymes shouldn't be taken literally anyway, they're typically rhymes full of metaphor and symbolism.
The Grand of Duke of York, he had ten thousand men.
He marched them up to the top of the hill,
and he marched them down again.
And when they were up, they were up.
And when they were down, they were down.
And when they were only half way up,
they were neither up nor down.
And from this, we learn that being indecisive or fickle can lead to ill-preparedness. And people might make up parodic songs about you afterwards.