I have had the exact same issue with my 07 Dmax. Happened the first time pulling a long grade last year, in the summer with my TT hanging off the back. It only does it when I'm towing.
I put a new fuel filter on it and it made no difference, indicating to me the problem is something else.
I posted a thread on this last fall. See it
here.
I never did get mine fixed, as I haven't exactly pinpointed the problem, but research I have done points to an issue some of them have with the fuel line itself. I am told there is a rubber line that goes from the bottom up the firewall and it has been known to get weak and collapse, giving the symptoms of low fuel pressure.
Might be worth checking out more on this.
Mine did it again on a highway trip in Alberta a couple months ago when it was cold out.
Let us know what you find!