Anxiety Medications Used for Sedation Dentistry On occasion, if the patient is significantly anxious, anxiety medications may be prescribed for before and during the dental procedure. In this type of sedation, valium or Xanax are sometimes given the night before the procedure (such as the root canal procedure).