Rotate group of objects over an edge
Here is a way to do it:


Select the edge that you want as axis.
Press ctrl alt spacebar to record this axis as one of your Transform Orientation axis. Keep this axis selected in the Transform Orientation dropdown menu.
Put your 3D Cursor on the selected edge with a shift S > Cursor To Selected.
Select 3D Cursor in the Pivot dropdown menu
Rotate your pyramid with R Y Y (or X X, depending of its name in the new Orientation Axis) and press the amount of degrees.
To delete the orientation axis you don't need any more, in the 3D view press N to get the right menu and go to the Transform Orientations tab.