Eureka!! We have pinworms.
He was up again last night, but not freaking out so at first we thought he just had to pee. Then when he had trouble settling afterwards, DH took a look (for once he was calm enough to let us do it!), and sure enough, little white and wiggling.
Gross, but SO relieved to finally know what the problem is!! We thanked him for being so calm and letting us look, and told him we knew how to fix the problem now and make his bum better. Off to get the pill this morning!
The doctor had asked if we'd seen anything moving around, but never said anything about it only happening at night, so after he checked and found nothing I assumed that was off the table. Thank you so much everyone for helping me figure this out! Never would have known what to look for otherwise.