You can generally refinance a loan anytime, although depending on the terms of your mortgage, there may be prepayment penalties involved where you need to compensate the lender the difference between the higher rate you had and the lower rate of the new loan. It is still generally worth it though if there is a good enough reason for the refinance.