It starts making intuitive connections between ideas, activating pathways to stored experiences, and searching the subconscious mind for pointers to relevant information.
When your foreground mind is engaged in a relaxing activity that is unrelated to work, your creative subconscious kicks in.