In all honesty I doubt that anyone who has ridden bikes for any length of time can say there hasn't been times when they go out on a ride where even within minutes of setting off they don't realise that their riding is below par and they are just not switched on and should not be out on a bike.
Nowadays I will never use the bike on the first day or so off night shift because of this and at least twice last year after a couple of miles I turned around and put the bike back in the garage.
I drive every day at work doing hundreds of miles in all weathers both day and night often under shall we say stressful conditions and now unlike when I was younger if I feel tired it is a case of stuff what anyone else thinks I am parking up and having a rest.
Have attended too many serious accidents over the last 30 years where tiredness and often momentary lapses of concentration have ended up with people dead.
Trick is to recognise when you are at that stage and stop, whether you are 200 or 20 miles away from your destination and have a bresk