If I was in your situation I would probably sleep and then do my best on the exam tomorrow. What's worse, being tired or unprepared? It's a hard question to answer, especially if you are stressed about your grades. I'd probably look things over once or twice, either before going to bed in the morning, and then not be so hard on myself and not consider it 'giving up'. Sleep affects how well you do on such things, but not getting enough sleep makes OCD much, much worse. The therapists I've been to are always very clear on that.
i would agree with OCD is the bane of my existence. a few weeks ago i stayed up most of the night writing out a “cheat sheet” that my teacher allowed us to have on the test. i had all the info i needed on that paper but only 4 hours of sleep and i BOMBED the test. i couldn’t focus at all and i was just thinking “i should do good i have all i need right here.” i would’ve been better off without the cheat sheet and more sleep but i guess i know that for next time🙃 good luck on your test, hope you get some sleep! you got this:))