Does nitric acid release hydrogen only when reacting with Mg and Mn?
Actually, it usually doesn't. It produces all types of products ranging from $\ce{NO2}$ to $\ce{NH4NO3}$ with exact products depending on concentration and conditions.

The reason for it is high oxidation power of nitric acid, exceeding that of hydrogen cations, so nitric acid reduces first. As result, to produce some nitrogen, the oxidation power must be brought below that of hydrogen cations. I'm not aware if it is actually possible, but possibly high dilution may help.

As for Mg, it reacts with hot water, so it's unclear if the reaction of $\ce{Mg}$ with diluted nitric acid counts. Not aware about $\ce{Mn}$ though.