I'm totally totally against this, but I'd be a Hypocrite saying Do not do it.
If you stupidly do Pull an All nighter (Again I'd strongly say do not do it), You may focus for the Maths Exam so long as you get at least 2 Hours sleep and have some oranges. I've done it before, but I'd advise you NOT TO DO IT.