Group the gluteal region by the two named gluteal nerves. The superior gluteal nerve comes out above the piriformis and takes care of gluteus medius, gluteus minimus and tensor fasciae latae. The inferior gluteal nerve comes out below the piriformis and serves only one muscle, the big gluteus maximus.
Gluteus medius belongs to the upper group, so its nerve is the superior gluteal nerve. A useful clinical anchor is the Trendelenburg sign: if the superior gluteal nerve is injured, the hip abductors fail and the pelvis sags toward the normal side while walking.
The remaining choices are easy to reject. The inferior gluteal nerve is committed to gluteus maximus. The nerve to obturator internus and the nerve to quadratus femoris run the deep short rotators, not gluteus medius.
The same logic carries over to the blood supply asked in the second part: the superior gluteal artery travels with its matching nerve above the piriformis and feeds gluteus medius, rather than the inferior gluteal, obturator or ilioinguinal vessels.
So both the nerve and the artery of gluteus medius are the superior gluteal ones.
\[\boxed{\text{Superior gluteal nerve}}\]