Method for detecting an insulation fault in an electrical accumulator battery, the method being designed to acquire an insulation resistance value (R i) from a detection device, the detection device being connected, on the one hand, to an electrical accumulator battery terminal and, on the other hand, to ground; and comprising, in series, a current-limiting resistor (R d), a filtering resistor (Rm) and a voltage source (U d), and a filtering capacitor (Cm) in parallel with said filtering resistor (R m), said voltage source (U d) comprising a permanent source (U ref) and another source (U d0) that is able to be activated by a switch that is connected in parallel with the terminals thereof; the method detecting the insulation fault as a function of an insulation resistance value (R i) obtained as a function of the measurements from the current-limiting resistor (R d), the filtering resistor (R m) and the filtering capacitor (C m); these measurements being obtained for two separate values of the voltage source (U d) performed periodically by a switching step of the switch (S 1); characterized in that the method implements a set of steps for optimizing the switching period, comprising: - a step of initializing the switching period of the switch and a time counter (T v); and in a loop, in successive increments (t-1, t, t+1) spaced apart by a predetermined duration (Δ T), the following steps of: o measuring the voltage across the terminals of the filtering resistor (R m); o calculating the variation of the voltage measured between the current increment (t) and a preceding increment (t-1); o if said calculated variation is greater than a predetermined threshold value, the time counter (T v) is incremented by the predetermined duration (Δ T); and o if said calculated variation is lower than said predetermined threshold value, said switching period is then defined as being equal to the value of the time counter (T v). the detection device being connected, on the one hand, to an electrical accumulator battery terminal and, on the other hand, to ground; and comprising, in series, a current-limiting resistor (R d), a filtering resistor (Rm) and a voltage source (U d), and a filtering capacitor (Cm) in parallel with said filtering resistor (R m), said voltage source (U d) comprising a permanent source (U ref) and another source (U d0) that is able to be activated by a switch that is connected in parallel with the terminals thereof; the method detecting the insulation fault as a function of an insulation resistance value (R i) obtained as a function of the measurements from the current-limiting resistor (R d), the filtering resistor (R m) and the filtering capacitor (C m); these measurements being obtained for two separate values of the voltage source (U d) performed periodically by a switching step of the switch (S 1); characterized in that the method implements a set of steps for optimizing the switching period, comprising: - a step of initializing the switching period of the switch and a time counter (T v); and in a loop, in successive increments (t-1, t, t+1) spaced apart by a predetermined duration (Δ T), the following steps of: o measuring the voltage across the terminals of the filtering resistor (R m); o calculating the variation of the voltage measured between the current increment (t) and a preceding increment (t-1); o if said calculated variation is greater than a predetermined threshold value, the time counter (T v) is incremented by the predetermined duration (Δ T); and o if said calculated variation is lower than said predetermined threshold value, said switching period is then defined as being equal to the value of the time counter (T v). - a step of initializing the switching period of the switch and a time counter (T v); and in a loop, in successive increments (t-1, t, t+1) spaced apart by a predetermined duration (Δ T), the following steps of: o measuring the voltage across the terminals of the filtering resistor (R m); o calculating the variation of the voltage measured between the current increment (t) and a preceding increment (t-1); o if said calculated variation is greater than a predetermined threshold value, the time counter (T v) is incremented by the predetermined duration (Δ T); and o if said calculated variation is lower than said predetermined threshold value, said switching period is then defined as being equal to the value of the time counter (T v). o measuring the voltage across the terminals of the filtering resistor (R m); o calculating the variation of the voltage measured between the current increment (t) and a preceding increment (t-1); o if said calculated variation is greater than a predetermined threshold value, the time counter (T v) is incremented by the predetermined duration (Δ T); and o if said calculated variation is lower than said predetermined threshold value, said switching period is then defined as being equal to the value of the time counter (T v).