An efficient and sufficiently power dense air compressor/ expander is the key element in a Compressed Air Energy Storage (CAES) approach. Efficiency can be increased by improving the heat transfer between air and its surrounding materials. One effective and practical method to achieve this goal is to use water droplets spray inside the chamber when air is compressing or expanding. In this paper, the air compression cycle is modeled by considering one-dimensional droplet properties in a lumped air model. While it is possible to inject water droplets into the compressing air at any time, optimal spray profile can result in maximum efficiency improvement for a given water to air mass ratio. The corresponding optimization problem is then defined based on the stored energy in the compressed air and the required input works. Finally, optimal spray profile has been determined for various water to air mass ratio using a general numerical approach to solve the optimization problem. Results show the potential improvement by acquiring the optimal spray profile instead of conventional constant spray flow rate. For the specific compression chamber geometry and desired pressure ratio and final time used in this work, the efficiency can be improved up to 4%.