"She needs to sleep" = "Sie muss schlafen". As "ihren" is specified though, you should translate it as "her". In most cases, the meaning of both will be very similar or identical, but with this site, it's best to employ the favourite phrase of Latin teachers everywhere (or maybe just the ones I had): "So treu wie möglich und so frei wie nötig" ("as faithful as possible and as free as necessary"), even though other things might sound better.
I mean, yes, but why?
I think the likelihood of anyone interpreting ‘ihr’ in this sentence as referring to anyone else than ‘sie’ is very low, as low as the chances of interpreting ‘her’ in ‘she needs her sleep’ as referring to another person. But technically ‘their’ would be correct.