Symbolism, Imagery, Allegory
There's an awful lot of disguise in this novel. Both Miss Clack and Godfrey Ablewhite are terrible hypocrites, which means that their public personalities – the way they present themselves to the world – work as masks or disguises for their true motivations. So it's appropriate that at the end, when Franklin Blake and Sergeant Cuff figure out that Godfrey Ablewhite is the one who took the diamond, Godfrey is wearing a literal disguise. They "unmask" him in both a literal sense (they pull off his wig and wipe off his makeup) and a figurative sense (they realize that he's a hypocrite).
But Godfrey's disguise deserves more attention. Why does he dress as a dark-skinned sailor? Well, most of the characters in the novel suspect that the Moonstone has been stolen by the three Indians who appeared at the Verinders' house at the beginning of the novel. They don't seem willing to suspect a white Englishman of having stolen the diamond, even after the three Indians have been proven innocent. Even though they have an airtight alibi, everyone suspects that they have some kind of "conspiracy" to steal the diamond. Of course, it turns out that they're right – in the end, the three Indians succeed in reclaiming the diamond and taking it back to India. But Godfrey's disguise could be a gesture toward that unwillingness to suspect a white Englishman of having taken the Moonstone.