I very strongly doubt there's anything to this grounding thing. I think it's placebo. But if you believe it, a simple way would be to take a wire from a ground point, whether putting it in the earth literally, or the earth connection of a wall socket, and the other end onto your bed sheets which you have washed with fabric softener. The resistance of the fabric softener treated sheets, even though extremely high, is going to be way lower than that from you to anything exerting an excess or deficit of electrons, i.e. static buildup, effectively grounding you, all night.