The phrase 'off one's rocker' is used to say that someone is insane or not thinking properly.
Example in use: "If you think that you are going to win the jackpot this week, you are off your rocker."
Imagine this: When you are old and fall off your rocker (rocking chair) you might be losing it meaning you are off your rocker!