How to restart Bluetooth service from command line
On High Sierra, none of the command line options worked for me.  I was able to plug in a wired USB mouse and use the Shift + Option with Debug/Rest solution.

I tried the blueutil solution on my High Sierra, and it worked like a charm.  I regularly have Bluetooth on my 2015 MBPR with an Apple Magic Mouse hose up, and have to restart. Yeah, I could open the lid and use the track pad, but it's on the other side of the wall from my desk space. 

You can install blueutil using Homebrew:

brew install blueutil


Or you can compile and install it by hand using:

cd ~/tmp/
git clone https://github.com/toy/blueutil.git
cd blueutil
make
make test 
cp blueutil ~/bin/


Now run:

blueutil -p 0 &amp;&amp; sleep 1 &amp;&amp; blueutil -p 1