People who are claustrophobic, anxious, or in a lot of pain may find it difficult to lie still in the MRI machine for the extended periods of time required for the test. If you are concerned about being unable to lie still, talk to your health care provider. They can prescribe medication to ease anxiety or pain. If you take a sedative or opioid pain killer for the procedure, you will not be able to drive.