The direct CP asymmetries of the decays B-0 -> K-*0 mu(+) mu(-) and B+ -> K+ mu(+) mu(-) are measured using pp collision data corresponding to an integrated luminosity of 3.0 fb(-1) collected with the LHCb detector. The respective control modes B-0 -> J/psi K+ and B+ -> J/psi K+ are used to account for detection and production asymmetries. The measurements are made in several intervals of mu(+)mu(-) invariant mass squared, with the phi(1020) and charmonium resonance regions excluded. Under the hypothesis of zero CP asymmetry in the control modes, the average values of the asymmetries are A(CP)(B-0 -> K-*0 mu(+) mu(-) and B+ -> K+ mu(+) mu(-)) = -0.035 +/- 0.024 +/- 0.003, A(CP)(B+ -> K+ mu(+) mu(-) = 0.012 +/- 0.017 +/- 0.001, where the first uncertainties are statistical and the second are due to systematic effects. Both measurements are consistent with the Standard Model prediction of small CP asymmetry in these decays.