A man charged with bludgeoning his schoolteacher mother to death while in the throes of an epileptic seizure at their Midtown apartment last year was sprung from jail on $40,000 cash bail yesterday and transferred to a locked mental-health facility.

Thanks to an unusual bail agreement more than a year in the making, Henry Wachtel, 20, walked out of Manhattan Criminal Court.

He and an escort boarded a jet at La Guardia en route to one of the Mayo Clinic’s three locations. It wasn’t clear which one.

Wachtel, charged with murder in the death of Karyn Kay, 63, a La Guardia HS teacher, will stay at the clinic while prosecutors and his lawyer continue to discuss whether he will take a deal, go to trial or see the charges dropped, as Kay’s friends hope.