Watch the Note Name Exercise online guitar lesson by Rob Garland from Chord Navigator: CAGED Triads

Play the same note on all six strings but do not use open strings. Choose random notes. For example: Begin with Bb, then play E, then G#, then D, and so on. You could use a metronome to to fire up that muscle memory and force you to reach for the note. Set it at 80 BPM. Do this every time you pick up your guitar and you'll have the notes down in no time.