... The first thing I'd think of was an overactive hedgehog. Cuda goes nuts every so often, and he just runs and runs and destroys whatever is in his path. But since it's been ongoing for 12 hours, that can't be the reason.
You're sure that there is no possible way that a quill has bent over and is jabbing him? You mentioned that he is scratching or rubbing his hind end... he doesn't happen to have a cut or insect bite, does he?
When you were at the vet, did s/he happen to give your little one an antihistamine or something of that effect? When Cuda had his allergic reaction, he was very agitated and spent HOURS pacing across his cage, scratching and quivering. The first night, I didn't notice anything but in the morning... he had welts all over. The vet gave him a hedgehog-strength antihistamine and within 2 hours, he was much calmer. A minuscule dose over the next 10 days eliminated the itching and freak outs completely.
Have you tried putting him in a very bright room? Sometimes, that causes a jittery hedgehog to calm down. Dim rooms signal that it's almost time to play and bright rooms tell them it's time to sleep.
Best of luck!