The parameters that have an effect on the extraction efficiency and/or on the epimerization of the ergot alkaloids namely the pH of the ammonium bicarbonate solution in the extraction solvent, the extraction solvent volume, the extraction time and the solvent evaporation temperature were optimised by means of experimental design. TheR2 values obtained by fitting a second order polynomial model were above 0.88 and theQ2 values above 0.6 except for ergosine (Q2 = 0.49), ergotamine (Q2 = 0.57), ergokryptine (Q2 = 0.53) and ergokryptinine (Q2 = 0.57). The results indicated that, in the range investigated (pH 7–pH 10), an increase of the extraction solvent buffer pH has a positive effect on the extraction efficiency of all analytes. However, it was also found that increasing the pH also increased the epimerization rate Therefore a pH of 8.5 was selected as a compromise. The results also showed that 40 mL of extraction solvent and an extraction time of 30 min were sufficient. Longer extraction time resulted in higher epimerization rate. Regarding the drying temperature (investigated in the range from 40 to 60 °C), less epimerization occurred when a temperature of 40 °C was applied; this temperature was therefore selected in the optimised procedure.