We study the application of Optimal Control Theory to Ion Cyclotron Resonance. We test the validity and the efficiency of this approach for the robust excitation of an ensemble of ions with a wide range of cyclotron frequencies. Optimal analytical solutions are derived in the case without any pulse constraint. A gradient-based numerical optimization algorithm is proposed to take into account limitation in the control intensity. The efficiency of optimal pulses is investigated as a function of control time, maximum amplitude and range of excited frequencies. A comparison with adiabatic and SWIFT pulses is done. On the basis of recent results in Nuclear Magnetic Resonance, this study highlights the potential usefulness of optimal control in Ion Cyclotron Resonance.