Peak load upgrade and downgrade SQL Server 2017 Standard  SQL Server 2017 Enterprise We are currently running on SQL Server 2017 standard edition and for higher traffic weekends like Mothers day we want to go on SQL Server 2017 enterprise version and during non peak hours we want to come back on Standard. We run on AWS EC2 images of respective versions. My question is

Can we just take the backup of 2017 standard and restore on 2017 enterprise? I mean do we have to do an in place upgrade and not a backup and restore
Similarly can we do a restore from 2017 enterprise to 2017 standard during non peak hours? I mean it is mandatory to do an in place downgrade

We tried the backup restore option and running into memory issues
What is the best approach?
Answers to your questions below, this doesn´t necessarily mean that I think it is a good idea, it seems quite a high risk approach to me.

Yes restoring a standard edition db to enterprise edition just works as long as it is not on a later version than the destination server.
Restoring an enterprise edition to a standard edition works AS LONG AS you have not started to use enterprise features

you can query sys.dm_db_persisted_sku_features
see
https://www.brentozar.com/blitz/enterprise-edition-features/