In the US, is it legal to cover up some of the required gyro instruments during flight under IFR in actual IMC?
To my knowledge there's nothing illegal about practicing partial panel in real IMC, however it's a spectacularly bad idea to do so. A failure of vacuum instruments in IMC is an emergency because you can easily lose orientation and dig a big hole in the ground. A safety pilot won't be able to help unless they have a separate set of instruments to rely on, and even then upset recovery in IMC is inherently less safe. 

If you want to practice partial panel pleeeeease do so in VMC, with a safety pilot.