According to how much a person increases his good deeds, so does Hashem deepen his thoughts, that is, He gives him a great mind.
Sefer HaMidos, Knowledge of God, Part I §34