"Jesus answered and said unto them, Destroy this temple, and in three days I will raise it up. The Jews therefore said, Forty and six years was this temple in building, and wilt thou raise it up in three days? But he spake of the temple of his body" (Jn. 2:19-21).
I think the answer lies in Jn. 5:19-21: "The Son can do nothing of himself, but what he seeth the Father doing: for what things soever he doeth, these the Son also doeth in like manner. For the Father loveth the Son, and showeth him all things that himself doeth: and greater works than these will he show him, that ye may marvel. For as the Father raiseth the dead and giveth them life, even so the Son also giveth life to whom he will. For neither doth the Father judge any man, but he hath given all judgment unto the Son; that all may honor the Son, even as they honor the Father".This makes it clear that all power and possibilities that Jesus had, were in fact given to Him by God. In fact, whatever God is spoken of as doing, it would be appropriate to speak of the Son doing it. This was and is the nature of their relationship. The one thing that it would seem God did for Jesus, in a way that Jesus could not do for Himself, was the resurrection of Jesus from the dead by God. It is emphasized so many times that God raised Jesus from the dead. And yet it's as if Jesus almost enjoys making the point that even in that, so connected is He with the Father, that in a sense, He raised Himself up- because whatever, literally whatever, God does, in a sense Jesus therefore does it too. This is why Jesus could say about His life in Jn. 10:18: "I have power [authority] to lay it down, and I have power to take it again. This commandment received I from my Father". He was given this authority by the Father (1). But even in the very thing where it seems God would be separate from His Son- i.e. in resurrecting the Son- Jesus wanted to emphasize that in a sense, He was still united with the Father. Because the Father so loved the Son, that whatever the Father did, He wished His Son to somehow be associated with. And so Jesus can speak of how in that sense, He [Jesus] was involved in His own resurrection- even though the repeated and obvious Biblical emphasis is upon the Father resurrecting His Son back to life. We see this theme touched on again in Jn. 10:18, where the Lord teaches that He has received a commandment to lay down His life and take it again, and yet He says that He has been given the authority / empowerment to do this, and therefore He will not die merely because of being unable to avoid the machinations of His murderers. So we could conclude that He obeyed a command to die and rise again- but was empowered by God to do this.
Another consideration in Jn. 2:19-21 is that Jesus speaks specifically about the 'raising up' of His body as a tabernacle. The 'body' of Christ frequently refers not so much to His literal body as to His spiritual body, i.e. the body of believers. In a sense, it is Jesus who has raised them up.
(1) It has been suggested to me by Chris Clementson that the Greek word exousia translated "power" or "authority" in Jn. 10:18 can mean 'privilege'- and this is a possible meaning given for the word by James Strong in his concordance. Other N.T. usage of the word definitely suggests 'power' or 'authority', but this idea of 'privilege' is worth bearing in mind.