We consider optimization of hybrid imaging systems including a phase mask for enhancing the depth of field and a digital deconvolution step. We propose an image quality criterion that takes into account the variability of the system's point-spread function along the expected defocus range and the noise enhancement induced by deconvolution. Considering the classical cubic phase mask as an example, we show that the optimization of this criterion may lead to filter parameters that are significantly different from those usually proposed to ensure the strict invariance of the PSF.