have one's wits about one
Also, keep one's wits about one. Remain alert or calm, especially in a crisis. For example, After the collision I had my wits about me and got his name and license number, or Being followed was terrifying, but Kate kept her wits about her and got home safely. [Early 1600s]
Dictionary.com presents 366 FAQs, incorporating some of the frequently asked questions from the past with newer queries.