lose your marbles
lose (one's) marbles
To be or become mentally deficient, incompetent, or deranged; to become of unsound mind. My poor grandmother started losing her marbles after she had a stroke. I've been so sleep deprived lately that it feels like I've lost my marbles!
lose your marblesINFORMAL
If you lose your marbles, you become crazy. At 83 I haven't lost my marbles and my memory is, thank God, as clear as it ever was. People are talking about him as if he's lost his marbles. Note: You can also say that someone has all their marbles, meaning that they are not crazy. He's in his eighties but he clearly still has all his marbles.