All substitute teachers have been in that situation when they've been though all the plans that the teacher left, but there's still time. Keep a file folder of emergency sub plans in your bag so when this circumstance arises, you can pull it out and pick out a new activity to keep kids from getting bored and unruly.
Reading is always a positive choice when looking to fill time, because it is something that is always productive and learning-based. You could require some mandatory silent reading time, but another option is to read a book out loud to the students. Students of any age enjoy having someone read to them.
Writing assignments can bring out a child's creativity and allow them to practice skills at the same time. Put a story starter on the board, such as "You wouldn't believe what happened when I walked into my kitchen this morning." Have students add to that sentence individually, or allow them to work in small groups, passing the paper and taking turns adding sentences.
Most classrooms have internet access and it only takes a few seconds to find something that will reinforce learning in a subject area. YouTube is full of videos on science, animals, and even entertaining math lessons. Have a list of pre-screened videos that are appropriate, engaging, and educational for many different age groups.
If you know ahead of time what level you will be teaching, you could keep some copies of activity papers in your folder. For little ones, a seasonal color by number paper will pass some time, and for older children a crossword puzzle or word mining game. For a high-energy group, some quiet time working independently on a paper can calm students.
Lastly, consider playing a game, especially for a class who has behaved well, gotten their work done and been respectful. Classic games such as Mumball, 7-up, or 4 Corners are favorites in a classroom. If possible, check the teacher's computer for PowerPoint games such as Jeopardy.
Substitute teachers have to be flexible. Wouldn't it be nice to know ahead of time when you will have substitute work and how much will be planned for you? Keeping a folder of last-minute lesson plans will give you confidence that you can handle any situation. What kinds of things do you keep at-the-ready for those rough sub days?