Keep it simple.
Short Term Sleep Dep
Give a -1 competence penalty to all rolls after the first 24 hour mark of wakefulness. Up to that point, a person can reasonably 'borrow against' their physical and mental resources to do stuff reasonably well. For each 12 hours of wakefulness past that, give another -1 competence penalty.
Someone who has been awake for 60 hours (I suffer insomnia under stress; I've been in this dark, dark place) will take a total of -4 to all rolls, which is pretty nasty.
Saves vs Sleep: It can be hard to stay awake. Adrenaline will only do so much, and then your body just starts to tell you 'no'. At 24 hours, and then every 6 hours after that, have the characters may a Will saving throw vs sleep. DC 10 for the first one, +2 DC per time after that. Add the competence penalty in - the DC increase takes that into account (at 60 hours, they should be rolling at -4 vs a DC 24). Failure means they lay down and get comfy (regardless of actual terrain). Circumstances may give a bonus (like being in the drow caverns), but it's amazing how persuasive sleep can be.
Second Wind: Most people get a second wind for short sprints, in the morning for people tied to their metabolic cycle, around noon for people who aren't. As an optional rule, you could halve the penalties (round down) for a few hours around that time.
Long Term Sleep Dep
For long-term sleep dep, where people are only getting a few hours a night, it's a lot less cut and dried. I've been going on 5-6 hours of sleep a night for the past year, and while I don't like it, I'd classify myself at the -1 penalty only. On the other hand, I've known people who simply couldn't function well with just one or two days of reduced sleep.
Personally, I'd treat the first few nights of reduced sleep as a -1 competence penalty, and then increase that by -1 per stage in time (a few weeks, a few months, a few years). And allow the following feat for the freaks like me:
Sleep Is For Wimps
Benefit: You suffer less from reduced sleep over the long term. Halve any penalties, rounding up (you always suffer at least -1). You may take this multiple times, halving the penalty each time.