The Messenger of Allah (ﷺ) said: Command your children to pray when they become seven years old, and beat them for it (prayer) when they become ten years old; and arrange their beds (to sleep) separately.
Sunan Abi Dawud Book 2, Hadith 105