My iphone starts playing music?

So my iphone starts playing music by its own more than 3 times, my iphone is oftenly in my pocket with my earphone and if i move alot, my iphone suddenly plays music that i last played. My theory is that the home button was pressed twice and my earphone in my pocket pressed the play button. This doesn't happen if i put my iphone in my pocket, it doesn't happen when i put it in my bag or anywhere else. But today when i sat on the floor with my iphone and my wallet, (my wallet was on top of my iphone) my iphone started playing music and i freaked out like literally.
I don't know what's wrong with my iphone, my iphone is not jailbroken.

It probably just hit a button that happens to my phone to but it hits the home button so Siri started talking randomly out of my pocket and I get scared.

Place your iphone face up in your pocket and take off the headphones

Do you earphones have a button you can press to turn music on and off

It might be the earphone jack i had some terrible earphones that when i connected them to my ipod they changed or stoped the music try usind different earphones.

This happens to me sometimes. I think that if your music app is still open and you hit the play button on the headphones it will just play the last played song.

I don't think you need to even hit the home button twice. Try moving the play button to a place where it won't get squeezed like under your shirt on your stomach or over your back