What can diazepam be used for? If you are 18 or over, the doctor can prescribe diazepam for you as a licensed medicine for anxiety or insomnia (sleep problems), to help if you are giving up alcohol, or to relax you before an operation like dental surgery.