Drivers hours and traffic problems

If you were stuck on the motorway due to an accident ahead and were static for an hour or more, would you be able to use that period of time as a rest? Or do you have to be at a services or somewhere off the road?