Originally under the Shikisei-ritsu (Office Penal Laws) (Zaikan Ochoku Fuchoku no jo (在官応直不直条, the article of guarding activities)) the guarding activity during the day was expressed as '宿' and the night activity as '直' and the combination of '宿直' was read as 'Tonoi,' but later it only came to mean the guarding activity during the night, which was described '宿直' or '殿居' and both were read as 'Tonoi.'
元来、職制律（在官応直不直条）においては昼の警備を「宿」、夜の警備を「直」と書いて「とのい」と読ませていたが、後世においては、夜の警備を「宿直」もしくは「殿居」と書いて「とのい」と読ませた。