In my case, Sonar DOES randomly change the Ins/Outs of tracks which in turn can make it stop seeing MIDI.
For example, a track may be set-up with input as OMNI and output as MIDISPORT Port C. One day I will open the project and input/output will be something random like Fantom and ARX.
Something similar happens with audio as well. One day the audio In may change from Channels 3-4 of the V-Studio IO to 1-2 or to Fantom, or to something else.
Sweetwater thinks this is a bug with the V-Studio IO. While they may be right, I know of no other V-Studio user with this issue. I think it is something flakey in how Sonar was set-up.
If it is the IO, I would be inclined to think it is a bug in the integrated Fantom since the set-up and support of the Fantom have always been weird. That was a selling point for me in getting the V-Studio, but it has been a pain from day one.
Just throwing this in on the chance it relates to this post.