My bunny rattled on his xpen too at 5am and every time i turned off the lights to go to sleep. Even though I let him exercise for some hours.
Try draping a blanket over his cage, covering up anywhere he can see you (My Xpen is against the wall, so I only cover half, really, but to the floor). Once I did this he stopped ratling (Unless its a weekend and I sleep in, then at around 10-11am he’ll rattle because he’s hungry and I’m late in feeding him/letting him out)
I don’t know if itll help, but it helped me and my bun. And my bun’s not neutered. If he can’t see, he’s not interested in coming out.
Try getting him to come out before bedtime though. Bring out treats and try playing with him (Get him excited to run around, like mimic what a bunny does while playing) and try and get him pooped before you go to bed. Buns are active at night, but I’ve found that if I get my bun pooped, he’ll be content in his cage eating hay. Not 100% but it might help some nights and bring back sanity.