you could use the switch to extend the cable, but you should never "hide" it under boards.
As long as the rating of the junction box is as big or bigger than the fuse rating of the circuit then you should be ok, however any joint in a cable should be easily accessible.