http://www.medicare.gov/publications/pubs/pdf/10050.pdf
Special Enrollment Period
If you didn’t sign up for Part A and/or Part B (for which you pay monthly premiums) when you were first eligible because you’re covered under a group health plan based on current employment, you can sign up for Part A and/or Part B as follows:
Anytime that you or your spouse (or family member if you’re disabled) are working, and you’re covered by a group health plan through the employer or union based on that work
Or
During the 8-month period that begins the month after the employment ends or the group health plan coverage ends, whichever happens first
Usually, you don’t pay a late enrollment penalty if you sign up during a Special Enrollment Period. This Special Enrollment Period doesn’t apply to people with End‑Stage Renal Disease (ESRD). See page 19. You may also qualify for a Special Enrollment Period if you’re a volunteer serving in a foreign country.
Note: If you have COBRA coverage or a retiree health plan, you don’t have coverage based on current employment. You’re not eligible for a special enrollment period when that coverage ends.