The seminal groundwork by (William) Grey Walter at the Burden Institute ("The Living Brain"*****) suggests that the origin of behaviour is an alpha wave oscillator that regularly pulses the feedback neural network that is the human brain; those alpha waves disappearing under the flood of echoes.
In my thinking, that pulsing acts as a gate for input stimuli.
What interests me is the chemical soup that must flood the brain to fix short term memories into long term memories. eg, sometimes when I wake up, I have vivid memories of my dreaming that stay with me and on other occasions I cannot remember anything other than that I have been dreaming.
***** First read this book nearly 60 years ago, as a pre-teenage youngster, when the Machina Speculatrix triggered my interest in cybernetics, and I do remember at age 16 in 1967 getting a copy of Wiener's book.</WAFFLE> :-)