All foreigners must report their location to immigration by filing a TM30 when their location changes. In some immigration offices it is ok if you are registered TM30 at your wife's house and leave the country, then return directly to the same house there is no need for a new TM30
i did it yesterday at O'smach. There are "guides" at gate that make it easier. 300 baht tip for a quick peaceful border hop. 500 baht "penalty" for not staying in Cambodia for 24 hours. 1500 baht for Cambodia visa at the border. 30 minutes and I was on my way home.