My experience is that cheap magnesium oxide tablets act like sleeping pills for me and can be too sedating if I take too many. I've also tried more expensive pills that claim to be more bioavailable but I'm not impressed.
If you actually want to get the magnesium into yourself, you should use a chelated form like citrate, glycinate, taurate or L-threonate. These are in the 70-100% bioavailability range. L-threonate in particular has been shown to readily cross the blood-brain barrier. Not worth wasting your time and money on oxide or even worse somehow, stearate.