Yes, the Martingale is legal to play at any casino, online or land based. It is one of the most well-known strategies out there and you will not find yourself in any legal trouble for using it.