Take It Into One's Head Definition

verb

To be seized with a sudden (often ill-advised) notion .

Wiktionary