If your dog is scheduled for surgery, he might receive midazolam for sedation prior to his anesthetic. Marketed under the trade name Versed, midazolam is not approved for veterinary use by the U.S. Food and Drug Administration but vets are permitted to use it as an "extra-label" medication. In people, midazolam is used for seizure control as well as sedation, but canines experiencing seizures are treated with other drugs.
Midazolam's use in dogs is almost exclusively for presurgical sedation, so it's unlikely your vet would prescribe it for at-home use. While most dogs become sleepy and quiet after receiving the drug, in some animals midazolam can have the opposite effect, making the canine recipient extremely excitable. Pregnant or nursing dogs, those with liver or kidney disease or severely debilitated animals should not receive midazolam.