You can use `gsettings` from within the sandboxed app. For example, I use Evolution via Flatpak. To enter the sandbox, run this from the terminal:
gsettings set org.gnome.evolution.mail
From there, you can use `gsettings` as normal.