The answer may be yes or may be no because although both coffee and tea have several scientific studies claiming that these drinks are good to our brain, the effects of caffeine are really dependent on the person as there are people who are simply not a caffeine tolerant and there are those who feel great after consuming a cup of coffee.
So how will you know if caffeine can be your studying companion? It is simple: If drinking coffee or tea makes you alert, attentive or boost your memory, then, you are like many individuals who benefited from caffeine, hence, you can use it as studying companion.
However, if you are someone who feels restless, have palpitations or unable to sleep after drinking a cup of coffee or tea, then, caffeine is not your friend and you should avoid drinking it 12 hours before studying or even before going to bed.
As for me, I am not a coffee drinker because I have palpitations after drinking it but I am a green tea lover because its mild caffeine content is already enough to keep me alert. I love its bland taste and mild aroma that is simply a perfect companion while I am studying or writing something.