It is totally legal if you have an
In "as will" term, I can leave your employer with or without cause, same as your employer. In your case, since your boss agree that your performance is fine, it will be trade as a lay-off for government underemployed benefit, Company may pay or not pay any compensation at they will, same as if you leave the company for other opportunity, unless there is a departure clause in your employment contract.