Douglas Adams said this quote

One of the major difficulties Trillian experienced in her relationship with Zaphod was learning to distinguish between him pretending to be stupid just to get people off their guard, pretending to be stupid because he couldn't be bothered to think and wanted someone else to do it for him, pretending to be outrageously stupid to hide the fact that he actually didn’t understand what was going on, and really being genuinely stupid. He was renowned for being amazingly clever and quite clearly was so—but not all the time, which obviously worried him, hence, the act. He preferred people to be puzzled rather than contemptuous.