Trump last week made an unannounced trip to McAllen, Tex., where she visited a shelter for immigrant children, as her husband's "zero-tolerance" policy of separating the children of immigrants entering the country illegally was roiling the country.
Unaccompanied children have been separated from their parents at US Customs processing facilities.
The White House did not immediately return a request for comment.
Some of the children have been reunited with parents or family members, but more than 2,000 still remain locked up in federal custody. "Our position is it violates the Constitution, violates due process, violates equal protection and violates the Administrative Procedure Act".
Judge Sabraw issued the order in a lawsuit by the American Civil Liberties Union.
A group of 18 attorneys general sued President Donald Trump's administration Tuesday over separation of migrant families at the border.
California Attorney General Xavier Becerra, who is co-leading the case with his counterparts in Washington and MA, said in a statement that the separation practice - spearheaded by US Attorney General Jeff Sessions - is "a new low" exemplified by "child internment camps".
The attorneys general are seeking a court order halting the separation process and forcing the government to reunite families.
The Trump administration has scaled back a key element of its zero-tolerance immigration policy.
A defiant Trump has, however, said that his "zero tolerance" policy on undocumented immigrants, in which all unlawful border crossings are referred for prosecution, will continue.
It is likely that the more than 2,000 detained migrant children will have to face court proceedings in coming days.
"The new federal executive order does not bring back together the thousands of families that were torn apart by the federal government's policy, and it does not prevent families from being separated in the future", Illinois Attorney General Lisa Madigan, a Democrat, said in a statement on the lawsuit.
The complaint said the administration's policy is also unconstitutional in part because it is "motivated by animus and a desire to harm" immigrants arriving from Latin America.
Lawmakers concur on the need for ending separations and speeding reunifications, but disagree on Republican attempts to lift a court decree known as the Flores agreement that limits federal detentions of children to 20 days.
A USA border security chief says he has temporarily stopped launching criminal prosecutions of migrants who illegally enter the country with children.
U.S. Border Patrol agents load migrant Gerberht Caraac, from Guatemala, into a van after he was caught trying to illegally enter the United States, Monday, June 25, 2018, in Hidalgo, Texas.