my experience of the Wake On Lan feature is that if you enable it, it works, but will frequently and randomly wake when you don't do anything to disturb it.
I use a Wake on LAN application on my home network, but am at a loss as to how to use it or anything similar to activate the iMac when I'm away from home.
I've fiddled around with the advanced settings on the BT Home Hub, but still am no closer to finding out how to allow LAN packets through
Apart from leaving it on permanently, or schedule times of day when I can use Back to my Mac, I'm going to put my hands up.
That chap is using a permanently on machine within the local lan to broadcast the magic packet. If the OP has a permanently on machine that would offer the easiest solution.
My netgear router won't port forward to broadcast addresses so I've found no way to switch on mine from over the internet.