A federal judge on Monday agreed to move accused swindler Allen Stanford to a federal lockup in downtown Houston to be closer to his attorneys, who are sifting through over 4 million documents in his case.

Stanford, 59, has been housed in the Conroe, Texas jail, about 40 miles north of Houston, since his arrest on June 18.

He will be moved to the Federal Detention Center in Houston by October 1 and will be housed there until his trial, according to an order by U.S. District Judge David Hittner.

Federal prosecutors did not oppose the motion, and could not be reached for comment on Monday evening.

His attorney, Kent Schaffer, said his client was in good spirits despite a number of health issues he has suffered at the Conroe jail, including a beating by a fellow inmate last week that sent the 6-foot, 6-inch Stanford to the hospital.

The transfer request was not related to the beating, and was filed under seal before the incident, Schaffer said.

He is optimistic about the way this case is being handled. He is encouraged by the ruling today. He is fairly upbeat, Schaffer said.

Stanford's next court appearance is set for October 14.

The former billionaire was accused of masterminding a $7 billion scheme by selling fraudulent certificates of deposit issued by his offshore bank and bribing regulators and accountants in Antigua to ignore the alleged wrongdoing.

He has pleaded not guilty to securities fraud, money laundering, obstruction of justice and other charges contained in a 21-count indictment against him and four co-defendants.

Defense attorneys had asked Hittner in a sealed motion to have Stanford transferred to Houston to get access to Allen and make meaningful preparation, Schaffer told Reuters on Monday.

The inmate facilities at the Joe Corley Detention Facility in Conroe do not allow face-to-face contact between Stanford and his lawyers and required him to be shackled during interviews, Schaffer said.

This is a case that involves over 4 million documents. You can't sit there and put them up to a window one by one, Schaffer said.

(The Houston facility) is a little different because now we can sit at a table and ... go through documents and digital discovery and make more sense of the evidence, Schaffer said.

The 2-hour round-trip allowed Stanford to sleep only a couple of hours on nights before he was transported to Houston, and would have cost taxpayers thousands of dollars in attorney reimbursement when they traveled to Conroe, he said.

In his order, Hittner wrote that a transfer was appropriate because of the unique circumstances ... in the case, including the gravity of the charges, the hundreds of thousands of records involved, and the enormous amount of time ... necessary to review them.

Stanford's fortune was estimated at $2.2 billion by Forbes magazine in 2008. Before the U.S. government seized his assets in February, Stanford lived an opulent lifestyle -- flying in his private jets or plying his 112-foot motor yacht around the world and to luxury homes in Texas, Florida and the Caribbean.

The case is USA vs. Robert Allen Stanford, Case No. H-09-342, U.S. District Court for the Southern District of Texas.

(Reporting by Gina Keating; Editing by Richard Chang)