Feel free to make up a story in your head on how this happened. I like to go with this:
Sonic jumped into the ocean in an attempt to try and save Shadow. However miracles don't work 24/7, so he nearly drowned in the process. The next thing he knew, he was in a lip lock with a particularly large kitty cat with an unhealthy fetish for frogs.
Sonic decided not to ask any questions and go with it.
[Full view for nearly wallpaper sized pic, enjoy!]