What do you do when your bf grinds their teeth while sleeping?

See a dentist. This is called nocturnal bruxism. It may be due to stress or no reason at all. If your boyfriend is concerned with preserving the anatomy of his teeth he may benefit from wearing a night guard. A dentist can make a custom fitted one or he can simply go to any drug store and get a universal fitting night guard as a cheap option. I understand it can be a nuisance as with snoring.
Get them to dentist. Get your bf to go to a dentist. There are many reasons why people grind them teeth. Failure to take action can result in tooth fracture, root canals and crowns or extractions. Also probably 50% of individuals have sleep apnea which can shorten your life or kill you.