I used to compromise on my sleep when I first started med school. I could have gone a week straight on 2-4 hours of sleep per day. This, of course, ruined my motivation, happiness and eventually my academic performance. It took me a long time to understand but sleep is VITAL! I was doing great getting at least 6 hours of sleep per day and then just when I was about to finish med school I reverted into the bad habit of almost no sleep. The last 3 exams I had (this was recent) were approached with almost no sleep and my performance suffered badly. I went down 0.5 points on my average which is a big drop.
So, don't make the same mistake as me. Sleep! I would even say prioritize it over knowing every single detail for the text (which is impossible, only I didn't understand that until I actually finished med school, how sad).