Obviously sooner is better as they will likely remember you a little more and be able to say something that is meaningful. However, I know many people that asked for all their letters at the end of the year and still got decent letters in the end. So... I dont think it is ever to late to ask. They can always say no...