The link to refunds is on this page: https://www.sj.se/om-sj/regler-och-villkor/rattigheter-vid-forsening
(Google translate works fine if needed.)
There are two options. The first is for travel solely with SJ services. The second is for 'resplus', which means that other train operators were involved.
I've used both. It's a simple form to complete and I haven't had a problem getting refunds for delays.
Do check the terms and conditions on that page though. There is a caveat that you can only book a replacement ticket yourself if they haven't offered you an option within 100 minutes. While that caveat doesn't apply to journeys where the train travels less than 150km, what matters is how long the train's journey is, not the distance you travelled, so it depends on your train's departure and destination stations as to whether or not it applies to you (i.e. even though it's less than 150km from Uppsala to Stockholm, if the train continues south it will probably still apply).
If you're not sure, you might as well put in a refund request, they can only say no.