Yeah, I've noticed that with my kid, too. When he learned to sit up and crawl, he would be nearly asleep, presumably in that part of sleep where your brain is wandering but you're not quite asleep yet, then suddenly,
bam, flip over and get on all fours to crawl, then start standing up on the bed. Once when I let him finish the task, he even visibly woke up, looked at me with some surprise, and then started crying again because he was tired, wanted to sleep, and clearly did not want to be standing up. Probably blamed me for it, too. No intentionality, it's just the "standing program" fired at an inopportune time.
Another funny one (from an AI perspective) dates from when he was about 4 months old; we were sticking our tongues out at him and he was starting to try to copy us, and I swear, you could see his leg jerk, then his left arm, then his neck, until finally he got his tongue out, just like there was a little man in his head pushing buttons until he found the right one.
On the parent's side: We have a dog and two cats, and our child just passed a year old. My wife was just telling me that she's caught herself being surprised a few times over the past few days, as my son does things like "puts the lid back on the container". She said she realized that up to this point she'd been subconsciously applying the "pet" template to our son, since that roughly matched his capabilities for the past few months (non-word vocalizations for needs, limited manipulation skills, understands only a few words, etc.), which she didn't even realize until suddenly he started to do a few things that didn't fit the template, like put a lid back on a container, or spontaneously use a keyring to mime locking the door (to the best of his ability). Kind of an interesting conceptual problem on the adult side.