I work in the quality department until 2:00 am and have a 2 month old and three year old so I often am tired by the end of my shift. If I have constant steady work, I am usually alright. I try to save the less mentally challenging work for towards the end. I can always take a walk to check on manufacturing also even if I've done all my required checks. I have a 40 minute drive home and usually eat and drink a cold beverage for the drive home. to help stay awake.
I had a temp job doing overnight desk clerking and temporarily fell asleep though on my second night when there was nothing to do but sit there. I had brought a book but some fell asleep anyway. I don't think anyone knew about it though.