I need to get at least five hours of a sleep a night to stay mostly functional. Seven hours is the perfect amount. I've probably done 45 hours for a paper or something. I regularly have to do 20-24 hours post call days. It's even more insane in Ireland/England where you don't get out of the hospital at 10-11 am (like we do in the US) post call, and instead you could be there as late as 6 pm. That's pushing 32 hours....not very safe...
I think I did a bit over 30 hours studying for a major exam. Not a good idea, I knew the material perfectly, but failed the exam because I just couldn't function mentally.