Nicholas Holzer, who is being held without bail, was arrested as soon as Santa Barbara County sheriff's deputies arrived at the home in Goleta. He reported the killings at about 11 p.m. Monday.
Sheriff Bill Brown said Holzer has no criminal record. He allegedly told deputies he carried out the killings because he "believed it was his destiny."
"There's nothing that springs out in terms of any motive or any event that would have preceded this terrible crime," Brown said Tuesday.
The victims were identified as William Holzer, 73, his wife, Sheila, 74, and their grandsons, Sebastian, 13, and Vincent, 10.
Police said that Holzer, who had custody of his sons, had been living with them and his parents for about seven years.
Investigators said Holzer apparently used two kitchen knives.