http://lxqyom6a3p6fdgsy6mpjyhjqjdpzleseck2jojwwzcilmsvduaeo7zyd.onion/2020/06/11/how-to-prove-control-of-a-bitcoin-segwit-address/index.html
In Electrum, create a new wallet and import the private key for the public segwit address you need to prove ownership of. In the GUI, simply select Tools and Sign/Verify Message.