I agree with the poster who mentioned focal seizures...please check out this link, particularly the section that describes
complex focal seizures:
Understanding Epilepsy
Complex focal seizures originate in the areas of the brain that control emotions and behavior (the temporal lobes) and are sometimes called psychomotor seizures. When a seizure begins in one of these areas, the animal's consciousness is altered and they behave bizarrely. They may run uncontrollably, engage in senseless, repetitive behavior, or rarely fly into a rage. Other times, we see bodily functions affected and the pet may have diarrhea or vomit. Following a typical generalized seizure, unusual behavior (post-ictal behavior) is common and may go on for hours. Complex focal seizures, like other types of seizures, are typically very brief.
Most often, an animal behaving aggressively or acting strangely has a behavioral problem or some other reason for the change in behavior.
If, however, these changes occur as discrete episodes, and the pet also has a generalized seizure, we can be sure that this is a complex focal seizure and treat it accordingly. People with complex focal seizures may experience hallucinations. Some dogs have episodes of fly-biting where they appear to be biting at imaginary flies around their head. Some of these may be complex focal seizures although we cannot tell for sure.