We should note that the dialogue has been building toward this point, especially in the closing myth. Socrates is no longer the astute dialectician ready to knock down his opponents' arguments. Here, Plato presents him as a man confident in his own theories and his own knowledge. His reference to swans singing at their death suggests an almost prophetic knowledge of what is to come for him. In this light, his myth at the end could also be read as divinely inspired. Certainly, it does not result from Socrates' normally preferred method of question and answer. By the time he drinks the hemlock, Socrates' soul is already in the grasp of the divine, and little else is required to release him.
Asclepius is the Greek god of medicine, and an offering would typically be made to thank the god for curing a disease. Socrates' suggestion in his dying words is that he has been cured of the disease that is life, and should therefore be thankful to Asclepius. For as long as we are alive our soul is tempted and distracted by the flesh. Only through death can our soul achieve that release that "cures" it of these ills.