I'm not sure it can be fully explained as glibly as "it relieves boredom". If we are talking solely about private sex play, the need for something different may play some part but there are lots of things that could satisfy that need, not just uniforms. So there would have to have been some prior factor that made someone feel a uniform was sexually arousing in some way. There could also be a 'received' element - people often say they like something simply because it's seen as something that is liked, such as men going "phwooar" over blondes almost on autopilot, as blokes are of course 'supposed' to like blondes. Uniforms have an element of that, I think.
I can't think of any uniforms that really get me going, the closest I can get is that there's something nice about that waitress dress code you sometimes see, with the white shirt and a tie tucked into black trousers. I also really - REALLY - like the goth/alternative/indie girl look, the sort of dress sense that evokes and other associated things such as short/dyed/spiked hair and piercings. I was about to say "not really a uniform as such" - but I think many would argue, well in fact in some ways it is exactly that.