It's said to be a "lightbulb" moment - when an idea pops into your head.
The adult human brain often displays this kind of spontaneous activity - and University of Queensland experts have uncovered how different experiences early in life might affect the nature of that activity and, in turn, alter an individual's behaviour.
Study leader Professor Geoffrey Goodhill, from the Queensland Brain Institute and the School of Mathematics and Physics, used zebrafish as a model to investigate the origins of spontaneous neural activity - in the form of new thoughts.
"We wanted to observe the fishes' spontaneous brain patterns to see if their environment had an impact on the way their brains wired up."
The researchers found that spontaneous activity in the part of the brain that processes visual images peaked when the zebrafish were five days old, and then declined.
"Zebrafish in the larvae phase are transparent, so we can directly image their neural activity," said Professor Goodhill, whose team included researchers from the UQ School of Mathematics and Physics and the UQ School of Biomedical Sciences.
"We then used a branch of mathematics called graph theory to analyse the resulting patterns."
The study found the visual environment the fish grew up in affected their spontaneous brain activity.
Turning off the lights while the larvae developed - known as "dark rearing" - changed their brains' patterns of spontaneous activity.
"One of the most interesting results was that dark rearing also reduced the larvae's ability to catch their prey, a single-celled organism called paramecia, even after the lights were turned back on," said Professor Goodhill.
"This shows that the environment affects the way the zebrafish brain becomes wired up as it grows, and this wiring change affects the fish's behaviour.
"It's very exciting that there is a lot more brain plasticity in the zebrafish brain than we previously realised.
"This means that zebrafish can perhaps help us understand what happens to the brains of people who are deprived of the right kinds of input early in life."
The team now plans to investigate whether there are certain moments during the zebrafish's early life when the right input is particularly critical for brain development, as has been shown in humans.
The study, 'Spontaneous activity in the zebrafish tectum reorganizes over development and is influenced by visual experience', is published in the journal Current Biology.