Come to one`s senses

To begin to think clearly or act sensibly.

The man came to his senses and bought a cheap car rather than an expensive one.