When it happened to us, they claimed they had UK authority to do so, but gave no details. Whether they really had or not clearly didn't matter to the bored officer who spoke to us - we would have been stopped regardless of our nationality and diplomatic agreements with the US. But it might be interesting to ask the Foreign Office just exactly what has been agreed.
To have the US acting as a self-appointed international maritime police force throughout the Caribbean, as the British did in the C19th, in practice I actually found quite reassuring rather than the opposite. At least it feels like they are on 'our side' and serving to deter the bad guys.
However, it does open the door in ways that are worrying. I prefer not to be ordered to stop by a vessel we can't positively identify in the middle of the night - a snap decision must be made as to whether it is genuine or not (they did illuminate their ship when I requested though). And I would definitely feel much less happy if the navies of some other countries, the North Koreans say, decided to do the same in other parts of the world.