Green’s Dictionary of Slang

boys in blue n.

also bellies in blue, blokes in blue, boys blue, gentlemen in blue, men in blue
[note 1920s UK boys in blue, permanently disabled ex-servicemen, some 7000 of whom were inmates of hospitals in Greater London area and wore a blue uniform; early use meant the Royal Navy; bloke n. (3)]

1. [late 19C+] the police; occas. in sing.

2. [1950s] baseball umpires.

3. [1960s] (US prison) warders.