I would agree with SKA and point to the studies of Franz Vollenweider regarding neuroplasticity and psilocin.
But another thing I recognized after doing spice several times, was that I stopped taking things as serious as I did before. I stopped being curious in order to desperately find out what is going on with the world and everything in favor for curiosity itself. I made me more relaxed so I could think better and it improved my focus. It just gave me the feeling that I don't have to, but I want to.
Another thing changing with spice was the lost of a stiff conception of the world. If one lives with such a conception the lost of it almost feels like one loses any conception of the world, because one stops trying to match new information with the concept. A whole instance got lost. It felt great. Instead of comparing new information with a bigger picture, I started comparing and building it in a "bigger movie". Knowledge became more dynamic and more information could be processed. And that without any loss of accuracy.
Before reading the next two paragraphs you should consider that these were my own experiences and I don't claim any general validity. The things I have done in the past long time ago, may go terribly wrong if another individual tries to cure him- or herself the way I did. See also:
DMT-Nexus-Wiki: Health and Safety
I know many people of different backgrounds, with different strong points who did spice. Many of them did other substances before like alcohol, amphetamines, cocaine and other addictive euphoriants. Almost all of them changed their consumption patterns in favor for psychedelics and less drugs overall. The only people that didn't like spice were the opiate addicts. Perhaps they need another cure (ayahuasca or iboga). I noticed that spice could perhaps be used in treating stimulant addiction. Treating, not completely curing! They all recognized positive changes. Some ex-stimulant addicts now spent their weekends with books and forest walks instead of doing alcohol and amphetamine and don't sleep for two or three days straight. It feels like the spice cured my circle of friends (and some acquaintances) and turned them into more intellectual people. Well, the more accurate their knowledge was before the less obvious are the changes, but it seems like the spice admonishes people to become more accurate with their words and thoughts. But perhaps it's just my (and some others) influence in the group. Group dynamics is always a complicated issue.
While talking about the spice curing addictions. Another point how it improved my mental apparatus was it stilled my irrational fears. I suffered from burnout due to "over-learning" (always wanted to be the best, straight A student, it changed a bit with college but not too much). Another problem I had were panic attacks, I guess I had at least one anxiety disorder. The panic attacks started with doing Salvia with Cannabis, benzodiazipines and LSD too often and way too young (I was 15 years old back then). Somebody wanted to help me when I was 18 years old and brewed me an ayahuasca analog, that helped me not to kill myself for about 4 years, but it didn't totally do the trick since I still had panic attacks and sometimes suicidal intentions. I never wanted to see a psychiatrist since I was too paranoid and didn't trust anybody. So I lived with my panic attacks through drug-free phases with ambitions of becoming a renowned scientist and drug-abusing phases with stimulants, alcohol, opiates and ambitions to end it all until I became 22 and the spice entered my life again. Then the quest for the spice began. And I did it a lot back then.
Now I am almost 24 and didn't do any drugs for over six months. And I also hadn't any panic attacks or suicidal intentions for over 9 months. I guess the spice and some other psychedelics cured me.

So, I would say the mental healing potential of the spice is also a huge factor in improving your mental abilities. If you observe a transformation of a person into a more joyful, thoughtful and intellectual person after doing spice some times, keep in mind you didn't see the inner demons they were fighting with. Or perhaps you saw them all the time manifesting in the persons behavior.
@Jot: And that's perhaps what you have noticed. I also noticed, that doing spice made me to exercise more care about my words and thoughts. It's like the spice was reminding me of the value of knowledge and accuracy. But I wouldn't use the term intelligence. Intelligence may improve after following the path the spice shows you with its reminders but I won't let you gain more intelligence, by simple consumption. You have to do a lot yourself, but since the spice changes "have to" into "want to" (at least for me and some friends of mine), it's not that bad as it sounds like and totally worth it.