My daughter had this kind of problem in 3rd and 4th grade a couple of years back. At the time, my thinking was "no distractions" while doing homework but what seemed to help was in fact distractions. She can now do homework, and a pretty decent job of it, sitting at the computer with music playing or the occasional web site on the screen. It all started when I noticed that burning a scented candle (at the kitchen table where she was working) next to her helped. She would stop now and then and stare at the flame or poke at the hot wax, then return to her homework.
I think what was going on there was that the homework was just way too dull and tedious for her to stick with it for long periods of time, and the distractions gave her a brief break. After I figured this out, I remembered that I had the same problem writing a PhD dissertation. I needed to take a very brief break now and then (mostly without getting out of my chair) in order to keep going. I think it might be related to the phenomenon of proactive inhibition (Google that) building up and serious hampering my ability to remember anything I was working on.
Did you find this answer useful?