A new microwave-assisted extraction (MAE) method has been developed for the extraction of melatonin from rice grains. The stability of melatonin under MAE conditions was studied in order to define the working range. The studied analytical conditions for the MAE were temperature (125−175 °C), microwave power (500−1000 W), time (5−15 min), solvent (10−90% EtOAc in MeOH), and ratio of solvent to sample (10:1–20:1). Extraction variables were optimized by Response Surface Methodology (RSM). Extraction temperature was found to have a highly significant effect on the response value (p < 0.0001) and the solvent and quadratic of time also had significant effects (p < 0.1). The optimized MAE conditions were as follows: extraction temperature 195 °C, microwave power 1000 W, extraction time 20 min, solvent 100% MeOH, and ratio of solvent to sample 10:1. The developed method showed high precision (in terms of CV: 4.97% for repeatability and 4.34% for intermediate precision). Finally, the new method was applied to real samples in order to investigate the presence of melatonin in a wide variety of rice grains.