Depending on your country of residence, some Italian consulates (like in Seoul, Korea) mandate all IMAT applicants to obtain VISA and take IMAT at the university of their 1st choice (*in Italy.) This is in order to prevent any "unfavorable circumstances" for the applicants in case they get "accepted by the university" but cannot meet the deadline to enroll by themselves with VISA (*VISA is mandatory for all non-EU applicants at the time of their enrollment procedure.)
Therefore, if your Italian Consulates mandate to apply for VISA, this is usually handled between Jul and Aug so that you can physically enter the Italian border to take IMAT at the university of your 1st choice.
Unless your Italian Consulates have any other policy, you may want to start VISA application process "right after IMAT," once you already know if your exam can be quite successful or not.
*If you are accepted but cannot enter Italy without new VISA, your new university MOST LIKELY DECLINE your enrollment via "phone or email," without your physical presence at the university office with ALL your documents ready.