Greg, was there any real build up to their nookie in the script?
Just what you saw in the movie.
But consider: Bruce is having a really bad day. He's lost his fortune, Alfred has abandoned him, Gordon has been shot up, Bane is causing havoc. He's standing in the rain, locked out of his own lonely mansion, having lost pretty much everything and everyone in his life . . . is it really surprising that he would welcome whatever comfort Miranda offered? She caught him at a really vulnerable moment, on a rainy night in front of a warm fireplace.
And, of course, she has her own agenda.