In the documentation (https://learn.getgrav.org/advanced/multisite-setup) I can find only details about the setup of multiple directories or subdomains. Is it possible to use different domains as well and would I create a line in setup.php as follows?
http://www.example.com --> user/sites/example.com
You are going to need to mix in some web server virtualhost setup to achieve that. The exact nature of that setup will be very dependent on your webserver of choice. There are plenty of examples out there on how to do that though… so try Google first.
I tested this and it is possible to do a Multi-domain setup. Just follow instruction on the Learn page to setup multisite, but instead of creating a folder with subdomain name just create it with your top-level domain name instead.