A 23-year-old woman is evaluated in the hospital for a 3-day history of a severe right hemicranial headache that has not responded to medication. She has had recurrent migraine for 17 years that typically involves severe right hemicranial throbbing pain associated with nausea and vomiting. Once or twice annually, the headaches are preceded by visual aura. Since age 13 years, migraine attacks have occurred twice monthly, with menses and ovulation as triggers. Typical duration is 24 hours, although occasionally episodes linger for 4 to 5 days. The patient also has anxiety. Medications are zolmitriptan for acute treatment of headache and alprazolam for anxiety. An infusion of fluids, intravenous prochlorperazine, and ketorolac in the emergency department brought no relief of symptoms.

On physical examination, blood pressure is 108/68 mm Hg and pulse rate is 86/min. All other physical examination findings, including those from a neurologic examination, are normal.

Which of the following is the most appropriate next step in management?