They mean the same thing, although unwittingly implies a lack of awareness more than inadvertently does. Really though this doesn't matter and both words will make sense.
Here is an example where, personally, i think unwittingly sounds better:
EG: "He unwittingly walked onto the wrong train" instead of "He inadvertently walked onto the wrong train"
In this context unwittingly sounds a little bit better to me, maybe because the situation is less severe and walking onto the wrong train is something you do out of a total lack of awareness like if you're daydreaming or something.
Here is an example where personally i think inadvertently sounds better:
EG: "He inadvertently started the war" instead of "He unwittingly started the war"
Inadvertently seems to sound better to me here because of the seriousness of the act and the fact that there's more of a possibility for some awareness over the potential for an accident to occur. In other words, he didn't mean for it to happen but he knew that it could happen.