Related words: top of the head, top of the head ideas, to make up the top of one's head, pull out of one's hat
Related questions:
How to make up ideas?
How to come up with ideas?
How to think of an idea?
Where do good ideas come from?
How to come up with a story idea?