It seems his most erratic behaviour is in the presence of Polonius. He knows Polonius communicates with Claudius and Gertrude and therefore must make sure his act of madness is not discovered. When he continues this act of madness, it makes no one question his sanity and gets him one step closer to the truth. He later kills Polonius and claims it wasn't "him" who committed the deed.
Polonius describes Hamlet’s madness in Act 2 when he says: “He knew me not at first; he said I was a fishmonger: he is far gone, far gone: and truly in my youth I suffered much extremity for love; very near this” (2.2.8).
Polonius describes Hamlet’s madness in Act 2 when he says: “He knew me not at first; he said I was a fishmonger: he is far gone, far gone: and truly in my youth I suffered much extremity for love; very near this” (2.2.8).