I make sure everything I was directly responsible for is in the hands of someone else, whether that be writing documentation or just letting them know casually. I cleanup any messy code I would consider myself responsible for and that I know probably won't get looked at - mostly for my own sanity's sake.
Once those things are done I largely get by doing smaller tasks and helping out where I can rather than directly involving myself in anything. Nobody has really seemed to mind.
Funnily enough, the last two days at my previous job involved HR and IT slowly revoking my access to most of the systems and groups we used at work (email, repositories, etc), to the surprise of my manager who said I could just kick back and relax until my last day.