We've already discovered that babies can smile in the womb – and now scientists say that may be able to daydream, too.
A study from from Imperial College London made the discovery after scanning the brains of 70 babies born at various stages of development.
Until now, it had been thought that the ability to daydream only developed properly in the first years of life.
But the new research has found that the necessary brain connections to daydream, known as 'resting state networks', are fully formed by the end of a normal pregnancy, according to the journal Proceedings of the National Academy of Sciences.
The new research means that newborn babies could be much brainier than we thought – or that scientists who first linked that brain area with daydreaming got it wrong.
Professor David Edwards, the study's lead author, said: '...either being a fetus is a lot more fun than any of us can remember – lying there happily introspecting and thinking about the future – or [that] this theory is mistaken.
'Our study shows that babies' brains are more fully formed than we thought. More generally, we sometimes expect to be able to explain the activity we can see on brain scans terms of someone thinking or doing some task.
'However, most of the brain is probably engaged in activities of which we are completely unaware, and it is this complex background activity that we are detecting.'
The researchers found that the 'resting state networks' mainly develop after 30 weeks – in the third trimester – and are largely complete by 40 weeks when most babies are born.
Scan reveals brain activity in the womb
New test reveals baby's gender at just seven weeks of pregnancy