"I accidentally dropped the cup of water on the floor and it spilt everywhere."
"I inadvertently told the postman that I was going on holiday next week. I hope he doesn't tell all my neighbours."
The meanings are similar. I don't know if there is a genuine difference which you can define. In the Collins dictionary, they are listed as synonyms of each other.
"Accidentally" is more common and perhaps suggests a more obvious mistake such as the water spillage I mentioned, and which you realise quickly.
I use "inadvertently" when the mistake is less obvious or more subtle. I use it more often for things I have said rather than things I have done.