Middleton, who denies killing a fellow member of a methamphetamine ring in 1995, had been scheduled to die early Wednesday. Missouri is expected to appeal the stay.
"Middleton has provided evidence that he has been diagnosed with a variety of mental-health disorders and has received a number of psychiatric medications over the years," U.S. District Judge Catherine Perry said.
Perry said other prisoners "indicate that he frequently talks to people who are not there and tells stories that could not have had any basis in reality."
Middleton's lawyers also argue that new evidence shows he has a solid alibi for the killing of Alfred Pinegar -- he was locked up in an Iowa jail. An expert who originally testified that insect larvae found on his body showed Pinegar was killed on June 23, 1995, now says a re-examination of the evidence shows the killing occurred on June 24.
Defense lawyer Kay Parish says that gives Middleton "an iron-clad alibi."
"He didn't just change his conclusion," Parish said of the expert. "He re-did all the work he had done back in 1995 and 1996 before he came to the conclusion that he has come to."
Attorney General Chris Koster has called the expert's new conclusion "an alleged discrepancy," saying it was "manufactured" almost 20 years later.
The defense also has a new witness who says he was shown Pinegar's body by two men who beat him with a baseball bat and threatened him with death if he told authorities about their drug activity. He said neither of the men was Middleton.
Parish said that Middleton's lawyer at his trial was not effective and that Middleton's mental illness has made it difficult for him to navigate the legal system.
If Middleton is executed, he would be the sixth person put to death in Missouri this year. The state has been trying to pick up the pace of executions.