If you remember from the end of the oghma infinium quest HM states that you had served him well and that very soon you and he would be working together again. Since he keeps all this forbidden knowledge it is quite possible he can foresee the events in Dragonborn. Was he foreshadowing to you the events that will take place in apocrypha in Dragonborn, as a way of Beth teasing you for DB, or was it just a coincidence.