In 2005, I came back to Pamplona for the festival after I finished the Camino. It was an absolute madhouse! I arrived late on the eve of the last running. There is an incredible energy and party/celebration atmosphere like none other I've experienced. I slept on a park bench that night under the stars, fireworks, partygoers, music, etc.
First thing in the morning I put my backpack in storage and went to the running. After, I went to the alburgue to ask for floor space on that night. I didn't want to take a bed from a peregrino walking through. I was asked for my pilgrim's passport and compostela to prove I had walked/completed. I was given a bed in a side room. That was really nice of them. So during that time, this particular alburgue was open. The Camino kept providing.
The rest of the day was filled with drink, food, dance, music, and all one can imagine on the last day of the festival. One of my best travel experiences!
To get to your question, I think it would be better to simply walk through Pamplona if during the festival as it will be nearly impossible to sleep at all. I think it would be worth the effort to stop and enjoy the festivities for a couple of hours but then move on.
Keep a smile,
Simeon