Usually you don't want your electrical wires to be taking any serious mechanical load, so that disqualifies most knots who's entire purpose is to take some sort of load.
That being said check out the underwriters knot, which is specifically designed for strain relief: https://en.wikipedia.org/wiki/Underwriter%27s_knot