Full Night's Rest
All creatures get tired after they have been awake and active for a while. In fact, any creature that fails to take a full night's rest after 24 hours becomes fatigued automatically (unless they have some way of mitigating or avoiding this). Sensible creatures will naturally sleep for some portion of each day to rest and recover from their daily activities. In game terms, any period of 8 hours of sleep, taken within a 12-hour period is considered a full night's rest. As long as a creature meets these conditions, it is treated as having taken a full night's rest, even if the hours of sleep are not contiguous.
Sleep can even be interrupted by encounters, such as a wandering group of trolls that stumble upon the party's camp. In such cases, the characters can get up, fight, and go back to sleep as though the interruption never happened, as long as they don't spend a huge amount of time after the fight looting corpses, or otherwise not sleeping. This is due to the fact that encounters rarely last more than a minute or two, so the interruption isn't considered meaningful to a character's ability to successfully get a full night's sleep. The same is even true if this happens multiple times in the same night. (Some GMs might love their random encounter tables a little too much...)
Spell casters usually require a full night's rest to recover their spells. Character abilities that are only usable a fixed number of times per day are only restored after a full night's rest. Full night's rests are also very useful for ending quite a few status conditions. Finally, all player-characters recover hit points equal to their character level after each full night's rest. (Technically, most monsters heal an amount equal to their CR each full night's rest, too. But most times, monsters rarely escape an encounter with PCs having only suffered a mere 'injury'.)
Adventurers, being a paranoid sort, will frequently make camp for a full 12 hour period, and set a watch order consisting of three watch periods. Each party member is assigned to one of those three watches (and, if the party is large enough to allow it, more than one party member might be assigned to a single watch). The first watch keeps watch over the camp for the first four hours of the 12-hour period, while those on later watch periods are sleeping. After four hours, the party members on second watch are awakened to keep watch from hours 5 through 8, giving everyone from the first and third watch periods a chance to sleep. And finally, the party members on the third watch are awakened to keep watch from hours 9 through 12, and those from watch periods one and two get to sleep. In this way, each party member is on watch for 4 hours, and asleep for 8 hours, and there is no time when someone isn't keeping a lookout over the camp.
While it is not strictly necessary for a spellcaster's sleep to be a continuous 8 hours, most will insist that it be that way. They'll go on, at length, about how restoring their auras is burdensome, and is too arduous and arcane a process to withstand the rigors of interrupted sleep. Some will even suggest that a full 12 hours might be better for them, and they don't mind if everyone else keeps watch in their place. Perhaps the rogue could take two watches. They don't do much anyway, so would anyone even notice if they're fatigued all the time?