The order was issued despite the fact that Ms DeMatteo's son Nicholas is in perfect health, and may set a precedent in a country already known for its draconian anti-smoking laws.
"The best interests of Nicholas dictate that he shall not reside in, or visit, or occupy any residence or motor vehicle of the parties in which smoking of any type occurs at any time," State Supreme Court Judge Robert Julian said in his ruling.
'Intrusion'
Nicholas' lawyer said the case ultimately centred on the issue of the child's health and potential exposure to second-hand smoke.
"No longer are we going to wait for a child to be sick...before the court can step in and protect the child," Nicholas' lawyer, William Koslosky, told ABC.
However Ms DeMatteo - who acknowledged that she smokes about 20 cigarettes a day - said the order went too far in attempting to address the interests of her child and was merely the result of an ugly divorce battle with her ex-husband.
"There are a lot more issues than to stop smoking," she said.
"That doesn't solve the problem of the intrusion into people's personal lives."
Ms DeMatteo's lawyer claimed Nicholas' father had turned him into "a little informant", and that he would be just as exposed to second hand smoke in public places.
"Under the judge's order, the father can request urine samples (and) air samples from her home," said Joan Shkane.
"The line has been drawn too far in this case. Where do we draw the line?"
Civil liberties
Ms DeMatteo now has 30 days to decide whether to challenge the order.
But she says she cannot afford to lodge an appeal, and has appealed to the American Civil Liberties Union and tobacco companies to aid her case.
The US has some of the most strict smoking laws in the world, with some states, such as California, banning smoking in restaurants, bars and public places.
Some American businesses have also placed restrictions on when and where their employees can smoke - even outside of their working hours.