We present an investigation of the magnetic properties of the pyroborates Mn2B2O5 and MnMgB2O5 using magnetization and electron-paramagnetic-resonance measurements. The pyroborates have in common with another well studied family of borates, the warwickites, substructures in the form of ribbons where the metals are located. The homometallic Mn2B2O5 system is shown to be a conventional three-dimensional antiferromagnet with Neel temperature T(N)approximate to24 K. Its magnetization isotherms present steps indicating spin-flop-like transitions involving distinct pairs of metal sites. The heterometallic compound MnMgB2O5 shows a susceptibility with a power-law temperature dependence chi(T)proportional toT(-alpha), down to T=1.8 K and a magnetization with a power-law field dependence M(H)proportional toH((1-alpha)) at low temperatures. This behavior is characteristic of a random singlet phase, in this case, in a system with spin S=5/2. We discuss our magnetic results on the pyroborates in connection with their structure and compare them with those obtained in the warwickites.