Lose one’s marbles

Meaning: To become confused, irrational or mentally unstable; often used humorously.

Example: I must be losing my marbles — I can’t remember where I put my phone.