Thought so ^^
Okay, I am going to be honest: I just asked Wiki. XD
Something I do know about Frankfurt is that it has the largest airport in Germany (at least I think so) and it is said that it is well worth a look if you have the time.
General ideas would be museums, churches and a walk by the river or maybe you want to go to the Zoo... yeah, I guess figuring that these are the first things that come to my mind, I wager it is obvious that I am a pretty boring person...
Anyway:
Wiki has a really long article about the city:
http://en.wikipedia.org/wiki/Frankfurt
There are some helpful links there, among them a link to the Travel Wiki:
http://wikitravel.org/en/Frankfurt
This should help you quiet a bit.
I also looked it up, but there doesn't seem to be that much interesting stuff at the fair at the moment:
http://www.messefrankfurt.com/corporate/en/
And about a place to study during the night... well, I wager you are likely to get a hotel room or something? I guess that is your safest bet.
Something else I looked up where the university libraries, because some in my home town are open till midnight and one even till two in the morning, but I couldn't find anything like that this far.
Best I came up with where some that are opened till 21:30, which doesn't really hit my idea of 'night':
http://www.ub.uni-frankfurt.de/zeiten.html
and one open till 22:00
http://www.ub.uni-frankfurt.de/medhb/mallg.html
Other than that: when are you going?
If it is mid summer you can just search for a quiet place at the river bank and learn there.
Of cause this means that there are such things as "quiet places" in Frankfurt and that you aren't afraid. I read that Frankfurt has a high rate of pickpokets and I know a few people (people from the generation of my parents and older) who don't feel easy when they are out late/ in the dark...
Then again I love being out late cause that's usually when you start having the streets for yourself....
So I guess best thing is to just try... ^_^;;