2012 Mercedes-Benz M-Class power loss

It looses power when drive for more than a couple hours, its like it goes limp and I have to pull over and turn the engine off for about 5 min. then it will be fine for a while again.

How long has the check engine light been on? How many miles on this?