The difference is the original statement was not about a specific man's experience; it was a generalization about married men's experiences as a whole.
Saying "I was in an unhappy marriage and it made me a great philosopher" would be fine. It's the generalization which is an issue here.
Additionally, consider that you are the one bringing the nagging wife trope into this: it's merely one of many possibile explanations and unhappy marriage.