There is no official fix for this as far as I can tell... BUT, if you do it by accident, and need to get unstuck or waste hours of gameplay, you can do this:
1) While stuck in cockpit, save your game with a new save slot.
2) Download & install the savegame editor at
http://benchmark3d.c...ave-game-editor (may require download & installation of MS .NET 4.0 if you don't already have it. )
3) In SaveGame Editor, open the game you saved when you got stuck.
4) Go to the Raw tab, and find '
2. Location' in left window. Under it, you should see 'Position'. Select it
5) In right window, set X's value to '100'. This will move Shepherd back a few paces to where you weren't stuck. Save this file.
6) Open new saved game file in ME3 and voila! You are unstuck!
You're all welcome.