sudden impulse; passing fancy
Refers to a momentary, often regrettable, impulse or whim that leads to an action, especially a misdeed. Commonly used in contexts of explaining or excusing an uncharacteristic act.
He said he shoplifted on a sudden impulse.
出来心でしたことは、やはり後悔するものだ。
Things done on a passing fancy are, after all, regrettable.