Read about how the brain state of theta is the one that's best for problem solving. Theta is the state when you're falling asleep or waking up and between active alertness and deep dreaming.
Its why we get the best ideas in the shower or while shaving or brushing your hair. It is a state where tasks become so automatic that you can mentally disengage from them. The ideation that can take place during the theta state is often free flow and occurs without censorship or guilt.