Clayton Osbon, 49, had been charged with interference with a flight crew and could have faced up to 20 years in prison.
Court documents show U.S. District Judge Mary Lou Robinson in Amarillo, Texas, received a report from a psychological examination that concluded, "at the time of the commission of the offense, the defendant appeared to suffer from a severe mental disease or defect that impaired his ability to appreciate the nature, quality, or wrongfulness of his behavior."
All parties, including the prosecutors, agreed to the report.
Last month, Judge Robinson declared Osbon fit to stand trial, saying he was "not now suffering from a mental disease or defect" that would make it impossible for him to assist in his own defense.
Osbon had been examined by a government-appointed psychologist who did not address whether he was sane at the time of the March 27 incident.
Witnesses said Osbon had to be wrestled to the floor of the plane that was heading from New York to Las Vegas after he began sprinting down the aisle, yelling that "Things don't matter," and talking about Afghanistan, Iraq and al-Qaeda.
Before being locked out of the flight deck by the first officer, the FBI said Osbon had tried to interfere with the plane's controls and began rambling, saying, "We're not going to Vegas," and warning the first officer that "We're going to have to take a leap of faith."
Judge Robinson ordered that Osbon be taken to a prison in Fort Worth, Texas, for a mental examination, then returned to court for an August 6 hearing, where his fate will be up to the judge.
Under federal law, people found not guilty by reason of insanity can be incarcerated until they can establish that they are entitled to be released.
Several passengers on board the flight have filed suit against JetBlue for gross negligence, saying the airline should have known that he was unfit for duty as a pilot.