
Take it into your head to do something
Impulse Decisions
The phrase often implies acting on an impulse, without much planning or consideration. 
Sudden Inspiration
It can suggest a stroke of inspiration leading to unplanned action. 
Unpredictability
Using the phrase can hint at a person's unpredictable nature or behavior. 