Reset the SMC > Intel-based Macs: Resetting the System Management Controller (SMC)
1. Shut down the computer.
2. Unplug the computer's power cord.
3. Wait fifteen seconds.
4. Attach the computer's power cord.
5. Wait five seconds, then press the power button to turn on the computer.
Reset the PRAM and NVRAM > Resetting your Mac's PRAM and NVRAM
1. Shut down the computer.
2. Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
3. Turn on the computer.
4. Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
5. Hold the keys down until the computer restarts and you hear the startup sound for the second time.
6. Release the keys.
Recheck your Bluetooth Preferences if you are using wireless (keyboard, mouse or trackpad) input devices to wake the iMac.