This phrase refers to someone trying to escape something something by climbing up a wall. It is not known when it was first used. Seriously, no amount of Googling yielded any results. The phrase today means to be annoyed, irritated, be driven to irrationality, etc. Here are a couple of examples of things that drive ME up the wall...