@curtis789 I use that technique with my son, and increased the amount of time a little as he's grown up. What made it fun for us was setting a cartoony mechanical timer, and later my son started setting the timer on Google instead.
We also have a daily wind-down alarm an hour before bedtime...