Answer: There is no reason given for Gregor Samsa's transformation.
Explanation: The opening lines are as much explanation as is ever given; the characters in the book show less surprise at the actual event and more disgust that Gregor is a giant insect. The metamorphosis itself is simply a given; there is no justification, or any reason that Gregor's human mind remains intact. Even Gregor himself is not so worried about the change:
"This getting up early," he thought, "makes one completely idiotic. A man must have his sleep. Other travelers live like harem women."