Railroads have had to deal with that since the Hours of Service Act in 1907. After 12 hours, train crews and dispatchers are "dead on the law", and have to stop the train. The railroad tries hard to prevent that. They don't schedule people for the full 12 hours. There are crew change points. Railroads put train crews up in motels. Ferry crews around in crew vans. Once in a while a train does end up stopped for that reason, usually because some other problem tied up traffic.
Interestingly, while there's theoretical work on the Truck Driver Scheduling Problem [1], there doesn't seem to be someone offering this as a service. That might be a startup opportunity for someone.
[1] https://www.sciencedirect.com/science/article/pii/S240589631...
Even with the best shift scheduling software, it's difficult to handle cases outside the railway company's control -- like the driver being tired because they were kept awake by external noise, stress etc when they were trying to sleep.
Uhh... keep driving home because HOS regulations don't apply when you're off duty? https://www.fmcsa.dot.gov/regulations/hours-service/personal...
"The following are examples of appropriate uses of a CMV while off-duty for personal conveyance ... Commuting between the driver’s terminal and his or her residence ... Authorized use of a CMV to travel home after working at an offsite location"
Although frankly the answer is "stop somewhere and sleep because your trip is too long to do in a single day" and I'm not sure why you think that somehow that's too much of an inconvenience for them.
Also on the mandated Sunday stop I see many drivers maintain their trucks and cabs. Life doesn’t have to be boring.
Now for health our hypothetical trucker above should get out and move, but face it, most people aren't getting their exercise.