It does. Intelligence is the capacity for learning potential and cocaine boosts the ability to retain and process learned sensory matter, even when sleepy. That is really the greatest appeal of that drug. Again, I strongly do not recommend reliance on any stimulants, especially powerful ones like cocaine.
I found this: https://pubmed.ncbi.nlm.nih.gov/2096405/ which shows a consistent improvement in tests, but the performance increase was only 4%. I'd be willing to guess that the improvement would be higher when sleepy/fatigued (up to a point!) since it would increase the alertness of the user, but I have never seen anything that suggests cocaine boosts the ability to retain information.