He saved the government some money; can he take compensation without their knowing?
This action that was suggested by your boss is haraam, and the money that would be obtained by means of this action is haraam, and it is not permissible for you or the administration to take it from the state in this manner that is based on lying and deceit.
Employees, whether they work for the government or not, have to do their jobs in the best manner and they have to try to bring benefits and ward off harm from their workplaces, and they take their salaries for their work in exchange for their efforts at work.
If a person does his job well and saves his workplace money, or he is the cause of them making abundant profits, it is not permissible for him to take more than his salary from his workplace, but he may submit a report to the administration showing them what he has done, and if they agree to offer him some reward for that, it is permissible for him to take it. Otherwise it is not permissible for him to take any money from them without their knowledge. If he does that then he is earning wealth in a haraam way.
The scholars of the Standing Committee for Issuing Fatwas said:
Sincerity in work or employment means doing the job in the manner required, as agreed upon in the contract or the system. It is a trust that must be fulfilled, as Allaah says (interpretation of the meaning): “Verily, Allaah commands that you should render back the trusts to those, to whom they are due” [al-Nisa’ 4:58]. End quote.
Fataawa al-Lajnah al-Daa’imah (15/155, 156.