The disclosure is directed to a method for implanting a medical device proximate to a target tissue site within an occipital region of a patient, such as proximate to an occipital nerve or a trigeminal nerve. The method comprises introducing an implant tool into a patient to define an insertion path to the target tissue site. The implant tool includes a shape memory cannula and a malleable needle at least partially disposed within an inner lumen of the cannula. The shape of the needle may be changed to accommodate different anatomical structures/features of the patient. Upon withdrawal of the needle from the cannula, the cannula may change shape, thereby changing the shape of the insertion path.