There was an interesting article in New Scientist by David Robson on brain function
HAVE you ever experienced that eerie feeling of a thought popping into your head as if from nowhere, with no clue as to why you had that particular idea at that particular time? You may think that such fleeting thoughts, however random they seem, must be the product of predictable and rational processes. After all, the brain cannot be random, can it? Surely it processes information using ordered, logical operations, like a powerful computer?
Actually, no. In reality, your brain operates on the edge of chaos. Though much of the time it runs in an orderly and stable way, every now and again it suddenly and unpredictably lurches into a blizzard of noise.
Neuroscientists have long suspected as much. Only recently, however, have they come up with proof that brains work this way. Now they are trying to work out why. Some believe that near-chaotic states may be crucial to memory, and could explain why some people are smarter than others.
Every now and again? Some of us are always full of random thoughts.