Rotate whole scene by 90 degrees

I’m trying to make it so on collision the whole scene rotates 90 degrees so the walls become the floors. I can’t figure out how to make my player use the walls as floor once the scene rotates any help appreciated thanks.

Make a empty gameObject to the scene, named " Map".
Select all objects on your scene, and drag to Map gameObject ( not player or camera, only map objects) , making Map gameObject parent of all scene.

public GameObject Map;
    public float angle = 90;

    void Start()
    {
        Map = GameObject.Find("Map");
    }

    void Update()
    {
        if(Input.GetKeyDown(KeyCode.Space))
        {
            Map.transform.Rotate(angle, 0, 0); // X axis
            //Map.transform.Rotate(0, angle, 0); // Y axis
            //Map.transform.Rotate(0, 0, angle); // Z axis
        }
    }