Some people do this. It's not that difficult.
It's usually easier to switch within the same Medicine program. But you can also apply to other programs. A number of PGY-2 IM positions open up at various programs for various reasons. You have to be on the lookout since the PGY-2 position openings are not necessarily posted.