No definition or usage of whence relates to time, but to place. One would therefore expect it to be some form of where, not of when. What caused when to pertain to time, and whence to pertain to place?
Whennes is the later (c1300) genitive of Hwanone, which according to the Online Etymological Dictionary is a related form of hwaenne, or the ancestor to when.
Genitives indicate origin, place, and possession (or circumscripture) of a noun. According to the dictionary, the -ce is what indicates that this is a genitive of a root word.
So when was apparently the same or a closely related word, but whence is a holdover of an ancient genitive case which English doesn't have, any more, so the syntactical distinction that once clarified the relationship between when and whence has been lost.
Once upon a time, though, the relationship was clear: one was a standard form of when, and the other was its genitive, or in other words, when, but applied to space, with respect to origin.
There is no relation between the origin of when and whence.
The origin of the words reported by the NOAD are the following.