Since Martensite has BCT crystal structure while Bainite is a fine blend of Ferrite (BCC) and Cementite (Iron Carbide), XRD should be useful to distinguish between them.
This question was previously asked by someone else on Research gate. The answer is simple. It is very difficult and quite often impossible to distingush between martensite and bainite as both have plate morphology. However, TEM can give you a conclusive answer (not SEM or XRD as suggested by some in this line of discussion). If you observe carbides along the plate boundaries it is definetely upper bainite. If you observe carbides lying at only one angle to the long axis of the plates (at about 60 degree) it is lower bainite. If there are no carbides at all it is almost certainly martensite. I said almost certainlt because there is also carbide free bainite in one special case, that is with silicon addition (about 2% or more). Other than that, if there are no carbides it is martensite. And tempered martensite presents another special case where one can observe carbides in plates. In this case, the carbides are lying at NOT one but at two angles to the long plate axis.
The body tetragonal crystal structure of martensite is very close to BCC of ferrite. Therefore it is very difficult to distinguish between martensite and bainite via XRD. And SEM can be very misleading to observe the differences I mentioned above.
In XRD the problem of distinguishing between the ferrite (BCC) and martensite (BCT) peak is only valid for low carbon martensite (here SEM images can be used to distinguish them). For medium to high C martensite peaks are well separated.