It's seems that there is a scam run by Thai immigration crooks at the Malaysian border. When you try to return to Thailand after crossing the border into Malaysia the same day, they tell you that you can't enter Thailand unless you stayed in Malaysia at least 3 days. And of course they can let you in if you give them a "tip" of around 2000 baht.
It's pretty much the same as the "stay overnight in Cambodia" thing. However, the difference is that in case of Cambodia, it's enforced by Cambodian IOs, who don't let you out of the country unless you give them a "tip". Some people say that it's an actual rule in Cambodia, although I doubt that. But in case of Thailand, this scam is run on the Thai side. There is sure no Thai law saying that you need to stay in Malaysia 3 days before you can come back to Thailand.