Is there any time period during which the maintenance of accounts and records is mandatory

Yes, as per section 36 every registered person is required to keep and maintain books of account or other records as prescribed under Section 35(1) and retain them until the expiry of 72 months from the due date for filing of Annual Return for the year pertaining to such accounts and records.

(ICAI FAQ PUBLICATIONS 06-09-2017 ACCOUNTS AND RECORDS: FAQ NO. 19)