ScienceDaily has an item on research on the brain activity of babies (here). It is published in Proceedings of the National Academy of Sciences, Emergence of resting state networks in the preterm human brain, by V. Doria, D. Edwards and others at Imperial College London. They used fMRI scans in 70 babies born at between 29 and 43 weeks.
Resting state networks
were at an adult-equivalent level by the time the babies reached the normal time of birth. One particular resting state network identified in the babies, called the default mode network, has been thought to be involved in introspection and daydreaming. MRI scans have shown that the default mode network is highly active if a person is not carrying out a defined task, but is much less active while consciously performing tasks.
Earlier research had suggested that the default mode network was not properly formed in babies and that it developed during early childhood. The fact that the default mode network has been found fully formed in newborns means it may provide the foundation for conscious introspection, but it cannot be only thing involved, say the researchers behind this latest study.
It does seem unlikely (maybe not quite impossible) that newborns introspect or daydream. However they probably have a lot of very special thinking to do as they start to perceive the world and deal with it. The results seem to indicate a certain amount of consciousness, even though the headline of the ScienceDaily report uses the words unconscious activity.