This extension converts the selected groups into Inkscape layers.
Simply unzip the downloaded file into the following directory:
/usr/share/inkscape/extensions(system-wide install) or
Select one or more groups and run the extension from the menu item Extensions > Arrange > Group to Layer. The selected groups will be converted into layers. If the selected groups contain nested subgroups, you can increase the "Max nested group depth" setting to cause subgroups to be converted into sublayers (up to the specified depth).