As I understand it:
The master socket is the point at which responsibility for the wires changes from BT (or Openreach) to the homeowner.
The socket and everything the other side of it belong to BT, it’s probably in the contract somewhere not to touch it, they’ll move it for you but charge something like £100-150. They might be miffed if you do it yourself (if they find out) and I’m sure I’ve read something somewhere about a fine for this, but I find it highly unlikely myself that they’ll care at all (IANABTEngineer)
There is no law about it, it’s perfectly legal. And easy enough to do.