Line a large baking sheet with parchment paper. If planning on baking the twists right away, preheat the oven to 400°F.
Open the tube of dough and separate it in half (the dough should separate naturally in the middle).
Sprinkle about ¼ cup cheese on your work surface and unroll the dough so that it lays flat on top of the cheese.
Sprinkle on half of the chopped pepperoni on top of the dough, followed by another ¼ cup cheese.
Fold the dough in half, then roll it out until the filled dough stretches to about 12 inches long. Cut the dough into 8 long strips.
Twist each strip gently like a corkscrew and arrange on the prepared baking sheet. Repeat the process with the remaining dough, cheese and pepperoni.
If baking right away, brush the twists lightly with the egg. Bake the dough twists in the oven until golden brown, 8 to 10 minutes. Remove from the oven and serve right away.
If making ahead, place the baking sheet in the freezer and freeze until firm, about 30 minutes. Transfer the twists to a resealable plastic bag or an airtight container and store in the freezer up to 1 month. To bake, preheat the oven to 400°F. Brush the frozen twists with egg and bake until golden brown, 10 to 12 minutes. Remove from the oven and serve right away.