I'm interpreting this question as- how to set an initial attitude (t=0), changes in which can then be tracked when the sensor readings start pouring in.
As Tristan's comment mentions, you could just assume an initial attitude and track, as it changes over time.
If you are trying to find the attitude of 'your system' in some external reference frame, (for which you are asking how to build a rotation matrix), then you need at-least 2 vectors, which are 'known' in the frames you are trying to relate.
As you already have an accelerometer, you could use the gravitational acceleration vector, and the 2nd one could be the magnetic north, the sun, and so on. Once you have these, you can build a triad, for the conversion. This video by Ross Dynamics Lab shows how to do it, and also has a MATLAB tutorial.
If the application is not super serious, then another relatively stupid way of doing it could be:
Physically place the system at some well-known angles with respect to the external frame, say 45 deg about all 3 axes, and then build a direction cosine matrix with 45 deg as the angles. And then track as it changes.
Hope this helps!