From a brief account online:
According to St. Basil, forty soldiers who had openly confessed themselves Christians were condemned by the prefect to be exposed naked upon a frozen pond near Sebaste on a bitterly cold night, that they might freeze to death. Among the confessors, one yielded and, leaving his companions, sought the warm baths near the lake which had been prepared for any who might prove inconstant. One of the guards set to keep watch over the martyrs beheld at this moment a supernatural brilliancy overshadowing them and at once proclaimed himself a Christian, threw off his garments, and placed himself beside the thirty-nine soldiers of Christ. Thus the number of forty remained complete. At daybreak, the stiffened bodies of the confessors, which still showed signs of life, were burned and the ashes cast into a river. The Christians, however, collected the precious remains, and the relics were distributed throughout many cities; in this way the veneration paid to the Forty Martyrs became widespread, and numerous churches were erected in their honour.