I'm sorry that I don't have an answer. However, you are not alone. I have experienced this with several phones. I have had several warranty replacements for the S5; a couple for my Note 5; and I am just getting frustrated with my S7 edge. There is no rhyme or reason, no pattern to the intermittant behavior. I had no idea what was actually happening until one day I was one the phone with AT&T tech support. While the technician was remotely checking out my phione, I was setting up a warrenty phone. When I went to connect a bluetooth headset and I was in the bluetooth settings, I saw the "switches" move from on...to off.
When I first searched for this issue on the web, I found messages indicating that the issue was with lolipop. So, I was looking forward to upgrading my Note 5 to Marshmellow. However, that did not occur, with no timeframe for hte upgrade. So, I upgraded to the new Galaxy S7 edge. It was working fine for a little while, but then it started shutting the bluetooth off, with more frequent occurances. Now, almost everytime I use bluetooth. It's so bad, that Ihave been considering going back to wired headsets, which is a bit inconvenient since I have been using bluetooth headsets from almost when they first come out, but it will also allow me to us nextradio.