At about 72 hours, you stop being able to control your staying awake. You have little 30-second “microsleeps” where your brain basically says “fuckit, I’m sleeping NOW” and shuts down for a smidge. Obviously anything requiring continual attention to prevent death (driving, operating machinery) is contraindicated after that point.
In addition, after about 45 to 75 or so hours, depending on your psychological makeup and your personal level of imagination and tendency to daydreaming (honestly) you’ll start hallucinating things - starting with minor stuff like visual shimmers, movement in the corners of your eyes, then moving up to auditory hallucinations that make sense for the area (people mumbling, doors slamming, footsteps), then moving on to classic paranoia, then moving into actually SEEING or HEARING things that aren’t there.
One of my classmates during a brutal week of theatre finals had to be talked down from her belief that a demon was standing over the pigment bins preventing her from getting the paint she needed to finish her project. She was a Catholic, so the rest of us “exorcised” the empty space for her so she would be able to continue. Obviously, hallucinations are dangerous also if they make you act in ways that aren’t matching with reality.
Animals who are deprived of REM sleep specifically do die. However, most people aren’t able to forcibly deprive THEMSELVES of sleep much past 70 to 100 hours or so, so you’re not likely to kill yourself by trying. Once you get to the point where you’re in real danger, your brain takes over and forces you down - sort of like holding your breath - you get to the point where it’s dangerous, you pass out, and breathing resumes to get you stabilized.
What is interesting is that if you’ve been sleep deprived over a long period of time, or REM-deprived (parents are especially suseptible to this since they get woken up so often) you’ll start dreaming more often, faster, and more vividly as your brain tries desperately to compensate. When people were deprived of REM for long periods, they eventually got to a point that they fell asleep, fell straight into REM, and stayed there for hours, as opposed to cycling in and out of it like normal.