Lebrun had been working as a dishwasher for several weeks at Jimmy the Greek Taverna on Glades Road in Boca Raton in March 2014 when he fatally stabbed his boss, Dimitrios Karaloukas, 62, in front of diners, according to authorities.
Officials said another worker was also stabbed but survived.
Lebrun told deputies that he stabbed his boss because the restaurant owner took Lebrun's photograph and posted it on the internet without his permission.
The judge made his ruling after a psychologist called to testify by prosecutors agreed with defense attorneys that Lebrun was legally insane at the time of the killing.
Lebrun has been in jail since the stabbing.