You could use the CD4046 integrated circuit to phase lock onto the mains waveform. If you use phase comparator number I then the 4046 output will be phase shifted by 90 degrees -- exactly what you want! The rising and falling edges of the 4046 output are aligned with the peaks and troughs of the mains voltage.
The good news is, this a VERY low speed circuit (50 Hz!) and you can prototype it on your solderless breadboard very easily. Signal generator, or little NE555 oscillator, provides 50 Hz "mains waveform". Your CD4046 single chip PLL, with the external R's and C's you have selected, produces the 90.0 degree phase shifted output. Put input and output waveforms up on a dual trace oscilloscope and tweak your design until it's as perfect as you require.
You might want to gate this with a "power has been good for 600 milliseconds" startup delay signal, just to make sure you're not firing the triac until all other wakie-uppie support circuits have powered up and stabilized. I'd suggest putting that through a two or three stage synchronizer, before the enable gate that connects the 4046 to the triac driver, to ensure the enablement happens smoothly, far far away from the clock edge.