@Zatloukal, Dominik Thanks for reaching out to Microsoft Q&A,apologize for any inconvenience caused on this.
Yes, you can scale-down the app service plan from Basic tier to Free tier and scaling-up of app service plan from free to basic tier is supported.
If this a regular/frequent task, then you can automate this scaling up/down operation using any of the below services.
- Logic App: Create a logic app workflow with HTTP action in it and thereby calling the App Service plans-update REST API.
- Automation Account: Create a Script using either PowerShell Cmdlet Set-AzAppServicePlan or by using AzCLI Cmdlet az appservice plan update
- Azure Functions: Create a PowerShell function App and run the above created script to scale up/down the app service plan.
Feel free to reach back to me if you have any further questions on this.