Riffing in jazz and rock is the chance of the musician to break out of the melodic and rhythmic structure of the song. Nowadays, jazz and rock tracks are limited by their structure; a single melody and rhythm. Because there is a single melody, a single prevailing rhythm--I'm talking most popular jazz and rock tracks, not avant-garde jazz and prog-rock, etc.--it is difficult to spend more than three or four minutes on the same idea. The lyrics, the build in emotions, the complexity of that single melody/rhythm can prolong it, but basically: one idea is limited in length.
I'm a theater person, so I like to ape what I see and apply it to theater. And theater, really, is the same way as music. Aristotle came in with what he called unities: unity of action, unity of time, unity of space. What Aristotle didn't demand is unity of tone/theme, or unity of character. Of course, in his splitting Tragedy from Comedy, he created the implication of a unity of theme/tone.
I don't know when exactly the concept of unity in character arose--perhaps it was always there, perhaps the psychological rise of naturalism created it--but to a certain extent, that became limiting. I know this because I think unity of character is what hobbles Shakespeare productions. It is not so much that the plot hits monotony--it's that with a unified character, it becomes difficult to hit all the different marks that Shakespeare leaves. A dour, depressed Hamlet (who is defined by dourness) simply cannot get the gravedigger scene, or the relationship with Rosencrantz and Guildenstern, or the scene where the play is presented to King Claudius. Nor would a comic Hamlet (I don't think anyone's ever tried to play Hamlet completely for laughs)
That carries into unity of tone. A dour Hamlet doesn't want to break the "mood" of the To Be Or Not To Be moment. If I were designing the play, I'd try to make it really funny right before "to be or not to be," if possible. I remember a production of Romeo and Juliet that I was once in whose major success was grasping the fact that the first half of Romeo and Juliet is a comedy. At the point it was written, Shakespeare had not written any tragedies. And nobody at the time knew how Romeo and Juliet ends. So straight up until Mercutio dies--even past the point where he is stabbed and is bleeding--the classic Shakespearean comedic devices are employed. I mean, for crying out loud, what does Mercutio say after being stabbed? "Call for me tomorrow and you shall find me a grave man!" Mercutio literally doesn't notice that things have become "dramatic." Suddenly he collapses, and there--then the tragedy starts, and the audience (and characters) realize the impact of what they've been doing.
If you play a Shakespeare play with a unity of tone, or a unity of character, you have to abridge. It will be too long. People will "get it." Especially since they know the ending. You might protest that there are many layers of language to explore--but if you're following a unified tone, or a unified character, you're not really exploring the language. Even in the same speeches, Hamlet goes from ecstacy to tragedy, from mania to depression, to absolute cool calm. This is not the place for a unified psychology, a logical progression of thoughts. If anything, Brecht understood this point best when he angrily denounced this unity of character in his Alienation Effect In Chinese Acting. Man is contradictory.
A sidenote: this is something that I first saw as a huge flaw in the otherwise well crafted, gripping, (and sometimes one-tone) Battlestar Galactica, a show that I highly recommend. No I have not seen the original yet, but I will eventually.
I liked this disunity of tone and of character best when I saw Patrick Stewart's Macbeth, and the now-infamous sandwich-eating scene (for those of you who haven't seen it... well, go and see it). The scene is such an odd deviation of tone and of character for Macbeth (without straining reality--because reality deviates in tones and of characters, as my day today has proven to me).
So why am I talking about this with riffing? Well, because... you should riff. If you've got a show that's got one tone going on, or one character, you need to find a place to riff. A place to drop whatever structure of the play is going on, and put in something that doesn't fit the play. David Herskovitz, for instance, would throw in places where the play falls apart--actors forgetting lines, etc. etc. If something breaks the mold of the play, steps right outside for a bit to play with new tones, new ideas, etc., then you won't have to worry about time; it might take up more time, but it will prolong the audience's interest.
Even in an "established" text like Shakespeare is open to riffing. There's plenty of riffing to go in between or around the lines. But if you've written your own work, are working on something new--leave room for riffing! Please. You wouldn't do it on the recorded track (i.e. the script) but you'd better do it when it comes to concert time (the performance).