lose one’s 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!