Yes, escaping prison is legal, as the desire for freedom is a fundamental human right. According to Mexican Law, it's not punishable.