Japanese government bonds have rallied alongside other so-called safe-haven assets in recent weeks as technology-sector jitters unsettled investors.