Well you know...if he doesn't do his work he wont get to graduate from 5th grade (and he shouldn't because he must acquire this skill before moving on to 6th or he'll really be in trouble).
I know that's not what you are asking though so I think the best thing you can do for him is not let him make you all miserable.
Break it down and give him one assignment at a time. Tell him he can have a snack as soon as he is done with that one assignment. Then leave him alone to do his work. Make sure it is a small assignment that should only take a few minutes, though. Once he finishes tell him how great he did and give him his snack. Then ask him if he needs to use that bathroom and then give him another assignment-maybe one that's a little bit longer or takes more concentration.
If he is anything like my 5th grader, he will procrastinate and have 10 million reasons why he can't do his homework yet (have to use the bathroom, need water, hungry, tired, blah blah blah).
If he needs help make sure he asks you specific questions about the homework, like what the directions are asking him to do. Explain how to do it and then leave him again. Keep it positive and calm. Don't get frustrated if he isn't making progress. Don't sit and do it with him. He has GOT to do it himself. If he can't do it he will really have a difficult time in 6th grade.
Another thing, don't let him stay up late to do homework. If he isn't finished by about an hour before his bedtime send him to bed early and explain to him that he has to get up early to finish. Tell him he's not in trouble but that it is scientifically proven that his brain is more alert and capable of doing homework early in the morning than it is in the evening.
He should also get started as soon as he gets home from school. Don't let him go off and play for awhile or anything like that (you know, to "unwind" from a long day at school). You don't want him getting out of school mode and then trying to get him back into that mind-set all over again. He is not being punished but he is learning that every action has a consequence and by him choosing not to do his homework when it was assigned, he caused this unpleasant situation of having even MORE work to do every day.
Some other thoughts: pull him out of sports and other extra-curricular activities. Make sure you tell him that this is not a punishment but that education will always be more important than these activities. You may also want to talk to the teacher about any tutoring they may have available through the school. Hopefully you can get him on track before the end of the year so he can be obtain the skills necessary to be successful next year when homework really starts pouring in (and it gets much more complicated as well!).
Best Wishes!
Oh yeah, I almost forgot! Talk to his teacher about reducing the amount of homework he is required to do. My 5th grader was only required to do every third math problem as long as she was doing well on tests and such. Some teachers will resist this but most should be more than happy to help find ways for children to succeed and especially to keep a positive attitude about school in general. If the teacher isn't helpful, talk to the principal about your educational concerns and ask if it is possible for him to have a specialized homework plan of some sort. Teachers are always more helpful when principals are involved.