Generally, from most free time to least, it's M4 > M1 > M2 > M3. With the caveat that the first half of M4, from ending M3 to submitting ERAS and getting interviews, is still pretty time consuming (sub-internships, Step 2, preparing application). You have time to do things you're interested in, though likely to a lesser extent that you did in undergrad.
M3 has the least amount of free time because you're working full days and sometimes 6 days/week (depends on the rotation obviously). And then after a full day at the hospital/clinic, you have to read and study because there's still an exam at the end of the month.