The rules clearly forbid driving while tired if it puts road safety at risk. The driver must assess their own state and stop to rest when needed.
Study on your phone. The same questions, always at hand.