If your Nokia 5730 xpressmusic often restart when charging or a charger is plug-in it always restart. Here's a simple solution to fix the restart issue, all what you have to do is update your phone firmware to the latest versions..
Instructions to make the update
1) Download and Install "Nokia PC Suite" on your PC.
2) Download and Install "Nokia Software Updater" on your PC.
3) Back up phone memory on the 8GB SD Card.
4) Remove the 8GB SD Card from the phone.
5) Make sure that the phone is fully charged.
6) Connect the phone to computer via USB Cable.
7) Start "Nokia Software Updater".
8) Follow the steps.
You can also used this method by using Nokia Ovi-Suite
and then update it to version 200.12.87 or higher and latest firmware versions.
For mobile technicians tips. Flash the Phone to latest and higher versions, this problem cause by a corrupted firmware. If the software update does not solve the issue, See here for which components needs to be check or replace. This problem occurs because the designed of 5730 Xpressmusic is not the same to other nokia mobile phone models circuit designs. The power ON/OFF switch is being connected with an IC that is also combined with a charging switching mode. If the said IC is damaged the charging data signal will trigger the power ONX of the PMIC (power IC) that will result to restart the phone or powering it ON and OFF again.