Stewie Griffin is smart because he got it from his gene which he inherited from one of most intelligent to ever live, Leonardo Da Vinci. Stewie discovered this during one of his numerous time travels.