Luc, over at the bruxhackers group has been working on a great project called SleepTrack. It's a wearable device and web application designed to monitor and control night-time bruxism. It's still in development (as of February 2016), but he's already made some incredible progress. The entire project is open source. I definitely recommend checking it out. And while you're at it, you should sign up for the bruxhackers group too!