This is mostly for the infantry, but may apply to the cavalry as well. From what I can gather, they may have been rotated back to the depot and commanded there. [There are always anomalies, for example the 5th Dragoon Guards had two LCols in the peninsula, one commanding a brigade and one on staff at Lisbon.]
Indian Service usually required that two Lieutenant Colonels accompany the regiment/battalion. The thinking here being that the King's Officers usually succeeded to Staff, Brigade or Station command there and having a 2nd LCol meant that the unit had its full complement of officers, in theory anyway. In 1817 both of the Lieutnant Colonels of the 1st Royals were senior enough to command brigades and the battalion was still commanded by a junior officer.
I recall that the debate on adding a 2nd Lieutenant Colonel to the Crimean War battalions centred on similar thinking; as well as a reward for the senior Major [The cavalry then were not affected and remained with one LCol]. The theory again being that one LCol would command the battalion while the other would command the depot and be available to take command if something happened to the senior officer [staff appointment, brigade command, health, etc.] On 9 March 1855 one Major in each Battalion serving in the Crimea was promote to 2nd Lieutenant Colonel and vacancies filled in the regiment. As regiments joined the army there after this date a Major would be promoted to 2nd Lieutenant Colonel. The downside was that at the war's end these 2nd Lieutenant Colonels would be placed upon half-pay. The Indian Mutiny saw some restored to full pay as their unit went to India.
For example in the Crimea, at the time of the Battle of Inkerman 5 November 1854, 10 of 28 battalions [less the Guards] were commanded by Majors or Captains with 6 Lieutenant Colonels commanding brigades; while for 1 April 1856, just before the army began to be broken up, there were 22 battalions commanded by their senior Lieutenant Colonel, 23 battalions commanded by their 2nd Lieutenant Colonel and 4 battalions commanded by a Major. [The Guards had a different command structure.] The army had two senior Lieutenant Colonels [as local Major Generals] commanding Divisions and 11 senior Lieutenant Colonels commanding brigades.
Hope this somewhat answers the question.