It depends.
If you're doing a standard 4-year med program, I would prepare the best that you can and sit the exam at the end of second-year.
If you're doing an intercalated degree (e.g. PhD, MPH) between your MS2 and 3, consider the possibility of a longer prep, but be very careful. It's important to be aware that those who sit the exam up to a year after MS2 has ended (e.g. Pollux or myself) do so because of lack of preparation by the end of MS2. That doesn't mean we hadn't worked hard during MS2; it just means we hadn't originally planned on sitting the exam and got what we "felt" to be a late start.
So if you know early on (i.e. any time during MS1 or early-MS2) that you are going to sit the USMLE, prep as well as you can during those first two years and sit it after MS2. In contrast, if you realize during second-semester of MS2 that you want to sit the USMLE, consider extending your prep, however, if you are content with <260, I would not consider taking the exam on any delayed schedule even if you are pursuing an intercalated degree.
I think scores in the 250s are possible even if you get a very late start on prep, which is why I would never extend if you are okay falling into this range.
Also, if you're the type of person who benefits/learns from SoM material (e.g. slides, lectures) significantly, it's best that you don't extend. However if you are a purely independent learner and read 10 hours/day at home and never go to class, extending your prep is to your advantage. The only fallback is how this might impact your MS3 or intercalated degree. If you think a lot about your own custom timeline and how things fit together, make decisions accordingly for what you feel is best for you.
Another thing: never let anyone tell you how long you should prepare for this exam. Take it when you are ready. Use the NBMEs as your gauge. If you're not scoring in your target range on the NBMEs, don't sit the exam. Plain and simple. This is the advantage that we have as IMGs. Btw, the above bold statement was told to me by two Mt. Sinai radiology residents I had met randomly when I had visited the States over the past New Years Eve. They scored 255 and 257, respectively, and I had asked them for their best advice in different areas, and they were firm that you should take as long as you need, and never to let anyone budge that.
Hope that helps,