Triptans are medications often used to treat migraines. They cause the blood vessels in the brain to narrow, which can relieve pain. Triptans also can be effective in treating cluster headaches. Triptans come in the form of pills, injections and a nasal spray.