Be careful not to bring theological and cultural assumptions to the text, namely that Hades and heaven are separate places (and the corresponding ideas about what they are).1 The notions of 'heaven' and 'hell' in Western culture were foreign in the mindset of first-century Judea, and thus reading these ideas back into the text is anachronistic.2
What is likely occurring in this passage is a wordplay in the Greek language between ἀνέστησεν and ὠδῖνας.
ὃν ὁ θεὸς ἀνέστησεν λύσας τὰς ὠδῖνας τοῦ θανάτου, καθότι οὐκ ἦν
δυνατὸν κρατεῖσθαι αὐτὸν ὑπʼ αὐτοῦ.3
...whom God raised up, having loosed the (birth-)pangs of death,
because it was not possible for him to be held by it.
ἀνέστησεν is the aorist active indicative 3rd person singular form of ἀνίστημι, literally meaning "to cause to stand or be erect, raise, erect, raise up", but also carrying the connotations of being brought "back to life from the dead" and "to cause to be born."4
ὠδῖνας is the accusative plural form of the noun ὠδίν, which refers specifically to the "experience of pains associated with childbirth."5
The NET translators point out that
The term [ὠδῖνας] is frequently used to describe pains associated with
giving birth (see Rev 12:2). So there is irony here in the mixed
metaphor.6
Keeping in mind that this passage occurs in the midst of a speech, Peter goes on to state that
[the patriarch David] foresaw and spoke about the resurrection of the
Christ, that he was not abandoned to Hades, nor did his flesh see
corruption (Acts 2:31, ESV).
Nowhere in this context does it state that the Jesus went to 'heaven' (the applicability of this passage to anyone other than Jesus is not supported by the text and requires eisegesis). The result of not being "abandoned to Hades" was "the resurrection," i.e. a bodily resurrection (not a disembodied resurrection to a spiritual 'heaven'). N.T. Wright explains:
Remember, resurrection does not mean being “raised to heaven” or
“taken up in glory.” Neither Elijah nor Enoch had been resurrected in
the sense that Daniel, 2 Maccabees and the rabbis meant it; nor, for
that matter, had anyone else. Resurrection will happen only to people
who are already dead. To speak of the destruction of the body and the
continuing existence, however blessed, of something else (call it a
“soul” for the sake of argument) is not to speak of resurrection, but
simply of death itself. Resurrection” is not simply death from
another viewpoint; it is the reversal of death, its cancellation, the
destruction of its power.7
So the idea here is the underlying worldview of a bodily resurrection, so that the death of Jesus is really a birth process (along with its associated pains) for new and everlasting life in a reality in which death no longer has power.
1 Cf. Luke 16:19-31 and note that both men went to Hades. Also note that death and Hades are thrown into the lake of fire in Revelation 20:14. Traditional Western Christian ideas about 'heaven' and 'hell' are simply incompatible with Biblical texts and their historical context, and must be eisegetically and anachronistically read back into the text to find support for them.
2 N.T. Wright. "The Resurrection of Resurrection" (Bible Review, August 2000), retrieved from http://ntwrightpage.com/Wright_BR_Resurrection.htm. In fact, the notion of a disembodied immortality which is popular in many Christian churches that teach the future hope as 'going to heaven' after death has more in common with Platonism than early Jewish or Christian thought.
3 Eberhard Nestle et al., The Greek New Testament, 27th ed. (Stuttgart: Deutsche Bibelgesellschaft, 1993), 324, emphasis mine.
4 William Arndt, Frederick W. Danker, and Walter Bauer, A Greek-English Lexicon of the New Testament and Other Early Christian Literature (Chicago: University of Chicago Press, 2000), 83.
5 Ibid., 1102.
6 Biblical Studies Press, The NET Bible First Edition Notes (Biblical Studies Press, 2006), Ac 2:24.
7 Wright, retrieved from http://ntwrightpage.com/Wright_BR_Resurrection.htm.