Don't wait too long. You can purchase up until the day before you leave, but the price did go up the longer I waited. It went from $90 to $110 over the course of the 3 months since I purchased within a week or two before sailing.
In addition, there are many companies that will refund your purchase price (minus a small fee) if you cancel your trip and don't have to use the insurance (IE cancel before the penalty date).
In addition (again) to insuremytrip.com look at squaremouth.com, there were more options on that site.