If you take the positive transition of your 5 MHZ as the clock edge, the the negative edge will occur at some time after depending on the percentage of modulation. Use the negative edge to fire a short period monostable and its output position will vary time wise with the modulation.
As the period at 5 MHZ is 20 nS, there is not much time to do any thing complicated. Depending on how wide you swing your pulse width, the error at the lowest pulse width will increase due to the firing time of the mono. I think the monostable should have a period of less then 1 nS.
Frank