Reconfigurable intelligent surface (RIS) aided cell-free (CF) multiple-input multiple-output (MIMO) system is of great significance to enable green communication. Nevertheless, the large number of elements deployed on RIS can result in unexpected computational overhead and extra power consumption. In this work, a sparse RIS-aided CF MIMO system is investigated. Correspondingly, an optimization problem of balancing spectral efficiency (SE) and energy efficiency (EE) is formulated with three matrix variables, i.e., precoding, phase shift and sparse matrices. Since the problem is non-convex and it cannot be solved directly, the problem is divided into three subproblems through fractional programming, and an alternating optimization is proposed by using the Lagrangian dual reformulation (LDR) and quadratic transform (QT). Furthermore, the subproblem of sparse matrix is formulated as binary integer quadratic programming (BIQP), and then transformed and solved by binary integer linear programming (BILP). Simulation results verify the effectiveness of the proposed algorithm in terms of EE and SE tradeoff.