The medical term is 'transient hyperopia', and although it has been known about since the 19th century the precise mechanisms are still not fully understood.
The degree and duration have been correlated to the HbA1c before diagnosis and the rapidity of glucose control. The mean effect on sight peaks around 1.5 dioptres but can be over 3, as it was for me.
The key word though is transient. Four weeks typically, six not being unusual. Tends to tail off more slowly than it develops.