The key to understanding the meaning of this line is the word "method." In this case, it should be taken to mean "purpose" or "artfulness." Read this way, what Polonius is saying is more like "although this is madness, there's a purpose (or a plan, or artfulness) in it. So what he's suggesting is that Hamlet really isn't crazy but is only pretending.
As it turns out, we know he is right. Hamlet is not truly crazy but is only acting like he is crazy so as to fool his mother and uncle.
"Though this be madness, yet there is method in it"
This line, spoken by Polonius as an aside, is significant as it shows he suspects Hamlet is not actually mentally unstable. Here, Polonius is conversing with the prince Hamlet in the hope of unearthing the reason for his madness. Hamlet, who clearly does not feel kindly towards the political advisor, is rude, telling him he is a "fishmonger" (Shakespearean slang for a pimp) and iinsulting Ophelia, his daughter. When asked what he is reading Hamlet deliberatly winds him up, telling him he is reading a book in which old men are said to "have grey beards" and "that their faces are wrinkled, their eyes purging thick amber and plumtree gum". He also tells Polonius that old men have a "plentiful lack of wit" (ie: they are stupid) and tactfully adds that he need not a book to know that for himself. This is a stab at Polonius who is elderly also and it as this point that Polonius suspects the prince is winding him up deliberately.
Polonius is proven correct later on in the scene when Hamlet is talking to his schoolfriends Rosencrantz and Guildenstern. He tells them that "I am but mad north-north west when the wind is southerly I know a halk from a handsaw." (Line 380) In other words he tells them that he is only a little but mad. He is only mad when the eind blows from one point on the compass.
I hope this helps you. Please feel free to leave me a message or reply if you have anything further you'd like to ask. :)