If we are to believe the Leslie Gourse biography (believing Leslie Gourse is not usually a good proposition, but she did interview Monk's widow, Nica, and others close to him), Monk suffered from very serious mental illness during his last years.
On the other hand, I have never heard anything recorded by Monk that lacked inspiration. It is only a matter of degree.