Ya this is not a problem I've ever had. If I'm that tired I just go to bed. I've had many a late night but never such that I'm unable to control where it is I fall asleep. Not sure how common thesw habits are.
I think it's more common among students (which the author happens to be). I used to fall asleep on my laptop during all-nighters in the library fairly often in college, when I didn't have the luxury of just going to sleep because I was tired.
On the other end of the spectrum, we've got things like redshift, and redshift-schedule, which alter the temperature on your screen to avoid sleep-depravation and actually maintain healthier sleeping habits.
I used both, especially for a time when I started migrating to polyphasic sleep.