It means that someone is comfortable, happy, and performing well in a particular situation or environment.
Example:
* "The chef was in his element in the kitchen, whipping up delicious dishes with ease."
You can also use "in their element" for someone who is not male.