A 38-year-old man is evaluated for headaches associated with visual changes. He describes intermittent headaches that began 18 years ago, occur three to four times per month, and typically last 12 to 24 hours. The pain is bifrontal, throbbing, occasionally severe, and worsened when he bends forward or ascends stairs. Headaches are accompanied by mild photophobia and phonophobia but no nausea or vomiting. Approximately twice yearly he experiences unilateral visual distortion during a headache attack that he characterizes as “looking through frosted glass”; the visual change typically lasts for only 30 to 40 minutes and then resolves completely. He has taken aspirin, acetaminophen, naproxen, and ibuprofen at various points to relieve his symptoms, but no medication has been effective in relieving either the headaches or visual distortion.

On physical examination, vital signs are normal. All other physical examination findings, including those from a neurologic examination, are unremarkable.

Which of the following is the most appropriate management?