Generic Flexeril is a muscle relaxant. It works by blocking nerve impulses (or pain sensations) that are sent to your brain.
Generic Flexeril is used together with rest and physical therapy to treat skeletal muscle conditions such as pain or injury.
Generic Imitrex is used for the treatment of migraine headaches with or without aura (eg, flashing lights, wavy lines, dark spots). An aura is a strange feeling or visual disturbance that warns you of an attack. It is not used to prevent migraines.