The optimal parameters for nuclear excitation by electron capture in plasma environments generated by the interaction of ultrastrong optical lasers with solid matter are investigated theoretically. As a case study we consider a 4.85keV nuclear transition starting from the long-lived ^{93m}Mo isomer that can lead to the release of the stored 2.4MeV excitation energy. We find that due to the complex plasma dynamics, the nuclear excitation rate and the actual number of excited nuclei do not reach their maximum at the same laser parameters. The nuclear excitation achievable with a high-power optical laser is up to twelve and up to six orders of magnitude larger than the values predicted for direct resonant and secondary plasma-mediated excitation at the x-ray free electron laser, respectively. Our results show that the experimental observation of the nuclear excitation of ^{93m}Mo and the subsequent release of stored energy should be possible at laser facilities available today.