Cars really do not have to rest like humans do and you'll get tired and need a rest long before the car ever needs to rest.
You should pull over at least every 2 hours and stop and take a break for yourself and allow your vehicle to cool down enough to check the engines fluids such as the coolant level, engine oil and check the transmission fluid as well.
I stop every 1 hour to 2 hours to take a break on a long road trip and check the oil, coolant, transmission fluid etc and fill up with gasoline as well.
Every time I fill my tank with gas I check the oil levels and transmission fluid levels to be sure they are up to the proper levels.
Cars and trucks and other vehicle are designed to be run a long time to get you to where you need to go.
A car can run continuously a lot longer than most people can drive before getting tired so your body will tire out from driving long before the car gets to where it needs to rest.
A car or other vehicle is a machine and really it doesn't need to rest like humans do so it can be drove forever if it were possible and it would still be okay.
But you may still want to stop on long road trips after 2 or 3 hours of driving and allow the transmission fluid to cool down and allow the engine to cool down which does save the wear and tear on your engine and transmission when the transmission fluid runs at a cooler temperature.
The longer the transmission is run down the road the hotter the transmission fluid gets and that increases wear on the transmission.
But you can drive your car as long as you want too as there's really not set time limit to how long the car or other vehicle can run.