This isn't something that is ever advised; the best thing to do regarding school or college work is to give yourself plenty of time, and don't do it the night before. If you find that you have too much work to keep up with, meaning you're working through the night, then you may take too many classes. If you do need to stay up all night, get a full, restorative sleep the night before and the night after.