To be compos mentis is to be of sound mind. It’s basically a fancy way of saying ‘I’m/he’s/she’s sane/sober/calm.’
Compos mentis is an adjective that translates literally to ‘in command of one’s mind.’ It first came into use in the English language in the early 17th century, around 1610.
Not to be confused with the opposite non compos mentis, meaning ‘not of sound mind.’ Both terms are generally used in the legal or medical profession, in the former when one tries to explain their behaviour with outlandish excuses they genuinely believe, and the latter when a patient is being assessed on whether or not they can make their own decisions about the healthcare and treatment they receive.
Outside of a legal and medical context, compos mentis can also be used metaphorically (which is how it is used in the examples below) however like many Latin terms is rare in informal use. Examples of use in a sentence include:
After studying for the big test, Bob felt that he was no longer compos mentis.
She was so drunk at the party she could no longer be considered compos mentis.