More than 6,300 Malaysians caught out in the Hat Yai floods have safely crossed back into Malaysia from Thailand, Wisma Putra confirms.