The coastguard said police had detained 196 undocumented Myanmar migrants in the early hours of Friday after their boat came ashore on a beach on the resort island of Langkawi.